Uml based test cases generation for the centralised control system of high speed maglev

Cover Page

Abstract


Background: The high speed maglev centralized control subsystem (CCS), which realizes the display, automatic train operation (ATO) and diagnose. The CCS is an important security assurance for train operation. System testing (ST) can detect design defects early and performed effective repair to improve the efficiency of the system’ on-site coordinated operation. Therefore, the quality of test cases directly determines the achievements and efficiency of CCS, and it is necessary to be tested before put it into use.

Aim: The generation of test case of centralized control subsystem is proposed.

Methods: In order to meet the requirements of the system, the first step is operating the extraction of functional features.  Then, the unified modeling language is using to develop the test model in this paper. Then the corresponding unified modeling language models, use case diagram, state diagram, activity diagram and sequence diagram, are developed. The state diagram of operation process is using to describe the state transition during the period from initial state of the OTS to the completion of the operation. The activity diagram of train operation process focuses on the control relationship during the period from one activity to another, which can describe the interaction exactly between OTS, DCS and VCS. The sequence diagram, behavior of use case, focuses on the sequence of information sent by objectives, in which a group of objectives and information transfer are presented. And according to these models, the test cases of the specified case are generated.

Results: The generated test cases are all executed in the developed lab-test system. The results show that the generated test cases can fully simulate the common situations of the operation scene, and effectively improve the test efficiency and test quality. We designed the experiments as followings: 85 test cases for terminal system design of operator, 68 test cases for train automatic operation design, 31 test cases for central diagnostic system design. All of the designed test cases are examined through the test platform, covering all main scenes in operation process. The errors or detects found in tests are solved by finding the reasons and modifying the code, etc. Finally, the pass rate of the method proposed in this paper is 100 %. 

Conclusion: The UML based method of test case generation implements the generation process and achieves the test cases and verification for CCS. Through the test practice, test cases designed can fully simulate all kinds of common situations in the operation site. What’s more, the test cases also realize early detection of errors and defects in the system and repair them. It is useful to improve the efficiency on-site testing process, to reduce the cost of time and test quality. The method can provide theoretical basis and reference for further testing of high speed maglev CCS.


INTRODUCTION

The high speed maglev centralized control subsystem (CCS), which realizes the display, automatic train operation (ATO) and diagnose, is an important security assurance for train operation. System testing (ST) can detect design defects early and performed effective repair to improve the efficiency of the system’ on-site coordinated operation. Therefore, the quality of test cases directly determines the achievements and efficiency of CCS, and it is necessary to be tested before put it into use.

As the core of test work, the test case has a direct impact on the efficiency of test. Tsai [1] proposed a test cases generation for data processing system, which mainly generates test data from the specification. Hall [2] studied the test cases generation method and presented Z specification based test cases generation method. The rapid expansion of object-oriented technology, the method of unified modeling language (UML) based test cases generation has attracted more and more attention. The method is focus on the selection of the dynamic model such as state diagram, sequence diagram, activity diagram and collaboration diagram to generate the test cases covering the test requirements for the guidelines. A.J. Offutt [3] et al. proposed a test case generation method based on UML state diagram and four test coverage criteria, developed the first tool that can automatically generate test cases. Ji Lili [4] extended the expression in terms of limitation of the transfer condition with Boolean type on the UML state diagram presented by A.J. Offutt. F. Falk [5] discussed a method based on UML sequence diagram and introduced the SeDiTeC tool. Wang Linzhang [6] et al. used UML collaboration diagram to integrated test cases generation method, and the test cases were generated by designed model. Chris Rudram [7] expended the semantics and grammar of UML activity diagram and proposed a formalized activity diagram. Zhang Mei [8] et al. designed a three-level conversion process from the UML activity diagram model to the test outline model, then test cases model. However, most of studies focused on single model diagram, there is less analysis about the combination model of multiple diagrams.

The high speed maglev CCS is the key security guarantee, and testing the system is a necessary process for its operation. This paper proposed a test case generation method by extracted system functional feature for CCS. Then, the generated test case examples are all executed on the test platform to achieve the verification of CCS.

FUNCTIONAL FEATURES EXTRACTION

The purpose of the functional test on system is to verify the ability that the system meets all functional requirements. Nonetheless, the transition from every requirement to corresponding test case will cause a large number and repeated test cases, which not only increase the cost but also reduce the efficiency of test. Therefore, it is necessary to extract and purify the system functional requirements for functional test.

Functional features are the functional entities that are extracted based on the system functional requirement and come from a set of requirements. Multiple test cases can be designed for one functional feature. In order to meet the comprehensiveness and legitimacy of the functional features, every requirement from system functional set is reflected in at least one functional feature, and each functional feature is come from system functional requirements. The relationship of system requirements, functional features and test cases is shown in Fig.1.

 

 

Fig.1. Relation between system requirement, functional characteristic and test case

 

METHOD OF FUNCTIONAL FEATURES EXTRACTION

Firstly, all the required functions and attributes of the system requirements are analyzed, and are grouped according to the characteristics for forming one or more corresponding requirement functional groups. Then, after analyzing and summarizing these requirements, the functional features are obtained. The main purpose of the functional verification of CCS is to verify whether the system meets all of the requirements in requirements specification. The process of extracting functional features of CCS is shown in Fig 2. 

 

Fig.2. Functional characteristics extraction process of centralized control system

 

RESULT OF EXTRACTION

Based on the process of functional features extraction proposed, according to the functional requirements of CCS, operator terminal system, automatic train operation system and center diagnostic system were extracted. The results are shown in Table 1.

 

Table 1.  Results of functional characteristics extraction

CCS

Functional characteristics

Operator

Terminal System

 

 

Operator

Terminal System

operator register

user change password

state display

relevant operation(CR)

add new user

delete user

start or close

labeling information

loading data

handle inspection message

operation procedure

find parts

generate orders

execute orders

performance requirement

video check

ATO

operator register

handle ATO state

response control(DCS)

operation schedule

TN number

operator control

system test

Dual redunda-

ncy control

performance requirement

train operation

-

-

Centralized Diagnostic System

start system

login and logout

overhead information

user management

delete or assign fault

fault list

data profiling

handle message

performance requirement (DTS)

-

-

-

 

UML BASED TEST CASES GENERATION

Operation Scene Analysis of CCS

Scenario technology can be used as a basis for system modeling at the test design stage. It can describes customer requirements and system functions, and is useful to design test cases. Each subsystem of the Centralized Control System has its own functional requirements. According to the system functional features, the operating process of Centralized Control System can be divided into several relatively independent scenarios. Each scenario contains numerous operations and information interaction. The main scenarios include: system rights management, order generation operation of operator terminal system, CR operation of operator terminal system, view display of operator terminal system, system coordination and interaction, train schedule operation, operation scheme operation, status change of ATO, operation monitoring of DCS order, train management, diagnostic information operation and the operation process of train, etc.

Operation Scene Modeling of CCS

Modeling the operation scene of CCS describes its internal state changes and information interaction from outside world in detail during the operating process, which also providing an important conference for guidance of test cases generation. In this paper, modeling and analysis are carried out based on each functional scene of CCS. This paper use illustration, sequence diagram, state diagram and activity diagram based on UML to express the action sequential logic of CCS from different angles. The following takes the typical scene of single-zone train operation as an example, the detailed modeling process proposed. Moreover, the modeling process of other scene is similar to single-zone train operation.

Use case diagram of operation process

As can be seen from Fig. 3, the test case diagram of single-zone train contains three participants: operator, DCS and VCS. These participants use cases to realize information interaction and complete functional requirement for current scene.

Fig.3. Use case diagram of operation process

 

State diagram of operation process

The state diagram of operation process describes the state transition during the period from initial state of the OTS to the completion of the operation, as is shown in Fig 4. In Fig 4, the state diagram starts from initial state of OTS, undergoing a series of processes such as registering train, scheduling a route, setting train operation and parking instructions. During this state diagram, the state of OTS and trigger events caused by transition are presented gradually.

 

Fig.4. State diagram in operation procedure

 

Activity diagram of operation process

The activity diagram of train operation process focuses on the control relationship during the period from one activity to another. As is shown in     Fig. 5, a control flow between actives of train operation process is formed, which can describe the interaction exactly between OTS, DCS and VCS by activity diagram. In addition, the purpose of this control flow is a presentation of system behavior.

 

Fig.5. Activity diagram in operation procedure

 

Sequence diagram of operation process

Sequence diagram, behavior of use case, focuses on the sequence of information sent by objectives, in which a group of objectives and information transfer are presented. The sequence diagram only shows a specific scenario of use case. The normal execution of sequence diagram during system operation process for every kind of order is given in Fig 6. During the operation process, approaches to information interaction with each other based on time schedule about OTS, DCS and VCS are expressed in Fig 6.

Fig.6. Sequence diagram

 

EXAMPLE VERIFICATION OF TEST CASE

The process of test case based on modeling diagram is shown in Fig. 7:

Step 1: select relevant modeling diagram for operation sub-scene

Step 2: confirm specific equipment involved in current scene based on use case diagram

Step3: determine the number of test cases required to cover all of the state diagram according to state diagram

Step4: confirm the procedure of every test case based on activity diagram

Step5: confirm the information interaction between equipment involved in test procedure based on sequence diagram

Step6: write the test cases document based on the standard format of test cases designed

 

Fig.7. Test case generation based on modeling

 

There are a large number of test case sets in CCS. The single-area train operation process is taken as an example to illustrate the process of generating test cases based on its modeling diagram. First of all, according to the use case diagram, there are three external participants involved in the scene: operator, DCS and VCS. The function of participants is to finish the test cases generation and observation of test results. Then, according to the state diagram, the state changes of OTS in this scene can be seen in Fig 5. The rule in state diagram is maximum coverage of states. In this paper, five test cases is involved. Finally, activity diagram and sequence diagram will provide specific operation procedures and information interaction during every procedure. Table 2 shows the result designed based on the normal condition of order execution.

 

Table 2.  Test case for train operation

Number

OTS_SYS_001_A

Designer

 

Title

Train operation process

Description

This test case is used to deliver message from OTS to DCS.

Step1:login train on the orbit

Step2:reserve route for specified train

Step3:send start order

Step4:set stop order

Precondition

OTS start, data has been loaded at Operating partition, CR-allowance

Post condition

The corresponding partition displays the data changes in the process view,

Changes in train data logged into the list

Test procedure

Operation(input)

Expected outcome

Test result

1

Right click “train login orbit”, select VLOG order

Display train login dialog box

 

2

 

Login information

Click “OK”

VLOG order in input field

Button highlight

 

3

Click “handle”

 

CR procedure, Red orbit for login train, train number

 

4

RR order

 

Reserved route become green

Direction arrow

 

5

Right click “login train orbit”, VDS order

VDS order in input field, handle button highlight

 

6

Click “handle”

Execution, operation and state changes displayed in view

 

7

CD View-View- train list

Train list, train’ velocity and position vary with operation

 

8

Right click to orbit

VS order

VDS order in input field, “handle” highlight

 

9

“handle” button

Execution, display corresponding stop signs, stop at parking lots

 

Conclusion

 

Tester

 

Test date

 

 

In this paper, method of test case generation method finally designed: 85 test cases for terminal system design of operator, 68 test cases for train automatic operation design, 31 test cases for central diagnostic system design. The designed test cases are all examined through the test platform, covering all main scenes in operation process. The errors or detects found in tests are solved by finding the reasons and modifying the code, etc. Finally, the pass rate of the method proposed in this paper is 100 %.   

CONCLUSION

A UML based method of test case generation is proposed in this paper, and implements the generation process to achieve the test cases and verification for CCS. Through the test practice, test cases designed can fully simulate all kinds of common situations in the operation site. In addition, the test cases also realize early detection of errors and defects in the system and repair them. It is useful to improve the efficiency on-site testing process, to reduce the cost of time and test quality. The method proposed can provide theoretical basis and reference for further testing of high speed maglev CCS.

ACKNOWLEDGEMENTS

All of the pictures and the data come from the project of 12th Five-Year" National Science and Technology Support Program", Research on integrated system of high speed maglev transportation engineering.

Lun Zhang

Key Laboratory of Road and Traffic Engineering of Ministry of Education, Tongji University

Author for correspondence.
Email: Lun_zhang@tongji.edu.cn
ORCID iD: 0000-0003-4795-1949

China, Shanghai 201804

Ph.D. Associate Professor

Wenwen Zhao

Key Laboratory of Road and Traffic Engineering of Ministry of Education, Tongji University

Email: tzwentz@163.com
ORCID iD: 0000-0003-0443-2153

China, Shanghai 201804

Master student

Xiyu Zhang

Key Laboratory of Road and Traffic Engineering of Ministry of Education, Tongji University

Email: 289032274@qq.com
ORCID iD: 0000-0001-5589-533X

China, Shanghai 201804

Master student

  • Tsai WT, Volovik D, Keefe TF. Automated Test Case Generation for Programs Specified by Relational Algebra Queries. IEEE Transactions on Software Engineering, 1990;16(3):316-324. doi: 10.1109/32.48939.
  • Pav H. Towards Testing with Respect to Formal Specification [C]. Proceedings of the Second IEE/BCS Conference on Software Engineering. Liverpool, UK. 1988;290:159-163.
  • Offutt AJ, Xiong Y, Liu S. Criteria for Generating Specification-based Tests [C]. Proceedings of the IEEE International Conference on Engineering of Complex Computer Systems (ICECCS '99) (Cat. No.PR00434). 1999. doi: 10.1109/iceccs.1999.802856.
  • Ji L. Resarch & Implementation of Automatic Test Case Generation Based on UML Statement Diagram Model [D]. Nanjing: Nanjing University of Aeronautics and Astronautics, 2004.
  • Falk F, Thomas L. SeDiTeC-Testing Based on Sequence Diagrams [C]. In Edinburgh,Proceedings of the 17th IEEE Intl. conf. on Automated Software Engineering (ASE’02), 2002:261-267. doi: 10.1109/ase.2002.1115026.
  • Wang L, Li X, Zheng G. An Approach to Generate Intedration Test Cases Based on UML collaboration diagrams. Acta Electronica Sinica, 2004;31(8):179-184.
  • Chris Rudram. Generating Test Cases from UML [D]. University of Shefield, June 23, 2000.
  • Zhang Mei, Liu Chao, Sun Chang’ai. Generation Tese Cases Based on UML ActivIty Diagram. Journal of Beijing University of Aeronautics and Astronautics. 2001;27(4):433-437.

Supplementary files

Supplementary Files Action
1. Fig.1. Relation between system requirement, functional characteristic and test case View (62KB) Indexing metadata
2. Fig.2. Functional characteristics extraction process of centralized control system View (112KB) Indexing metadata
3. Fig.3. Use case diagram of operation process View (215KB) Indexing metadata
4. Fig.4. State diagram in operation procedure View (289KB) Indexing metadata
5. Fig.5. Activity diagram in operation procedure View (564KB) Indexing metadata
6. Fig.6. Sequence diagram View (453KB) Indexing metadata
7. Fig.7. Test case generation based on modeling View (200KB) Indexing metadata

Views

Abstract - 35

PDF (English) - 14

PlumX


Copyright (c) 2018 Zhang L., Zhao W., Zhang X.

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.