TY - GEN
T1 - An Approach to Automatic Test Case Generation for Unit Testing
AU - Liu, Pan
AU - Xu, Zhenning
AU - Ai, Jun
N1 - Publisher Copyright:
© 2018 IEEE.
PY - 2018/8/9
Y1 - 2018/8/9
N2 - In the paper, we propose a method to automatically generate test cases for the program with nested loops. Our approach first constructs the layer model of the program by scanning procedure source code. Then, through the method of model refinement, the layer model is converted to the extended regular expression model. Next, we can get a set of test paths from the extended regular expression model according to algebraic operations and constraint conditions in the program. Finally, test cases of the program are constructed by using logical operations for these test paths. Compared with those traditional graph-based test case generation methods, our method can produce a set of executable test cases to satisfy a given test coverage criterion without having to build the control flow diagram of the program in unit testing. In addition, our method can also effectively avoid the state space explosion problem.
AB - In the paper, we propose a method to automatically generate test cases for the program with nested loops. Our approach first constructs the layer model of the program by scanning procedure source code. Then, through the method of model refinement, the layer model is converted to the extended regular expression model. Next, we can get a set of test paths from the extended regular expression model according to algebraic operations and constraint conditions in the program. Finally, test cases of the program are constructed by using logical operations for these test paths. Compared with those traditional graph-based test case generation methods, our method can produce a set of executable test cases to satisfy a given test coverage criterion without having to build the control flow diagram of the program in unit testing. In addition, our method can also effectively avoid the state space explosion problem.
KW - Extended regular expression
KW - Test case generation
KW - Test constraint
KW - The layer model
KW - Unit testing
UR - https://www.scopus.com/pages/publications/85052527727
U2 - 10.1109/QRS-C.2018.00097
DO - 10.1109/QRS-C.2018.00097
M3 - 会议稿件
AN - SCOPUS:85052527727
SN - 9781538678398
T3 - Proceedings - 2018 IEEE 18th International Conference on Software Quality, Reliability, and Security Companion, QRS-C 2018
SP - 545
EP - 552
BT - Proceedings - 2018 IEEE 18th International Conference on Software Quality, Reliability, and Security Companion, QRS-C 2018
PB - Institute of Electrical and Electronics Engineers Inc.
T2 - 18th IEEE International Conference on Software Quality, Reliability, and Security Companion, QRS-C 2018
Y2 - 16 July 2018 through 20 July 2018
ER -