This paper proposes a new method for automatic generation of test cases using model based testing. As test model, class and state diagrams are used, and constraints are expressed using OCL. First, the state machine is converted into a mathematical representation in AMPL. Then, using a search algorithm and based upon coverage criteria, the abstract paths are selected from state machine. Second, using symbolic execution, the generated abstract path along with the constraints on this path is converted into the data of generated mathematical model. Third, the generated mathematical problem is solved with solvers that have interface with AMPL, and the test data is produced for each abstract test case. Finally, the generated test data and abstract paths are transformed into executable test cases. All-Transitions and All-States coverage criteria are used for conduct search algorithm, as well as the criteria for evaluate the quality of generated test cases. To validate the work, by utilizing various solvers, the test cases are generated for various problems. The proposed technique is implemented as a tool, named MoBaTeG. The tool shows good result in terms of test case generation execution time, test goals satisfaction rate, source code instructions coverage, and also boundary values generation.
Rezaee, A., & Zamani, B. (2017). A novel approach for automatic model-based test case generation. Scientia Iranica, 24(6), 3132-3147. doi: 10.24200/sci.2017.4528
MLA
Amin Rezaee; Bahman Zamani. "A novel approach for automatic model-based test case generation". Scientia Iranica, 24, 6, 2017, 3132-3147. doi: 10.24200/sci.2017.4528
HARVARD
Rezaee, A., Zamani, B. (2017). 'A novel approach for automatic model-based test case generation', Scientia Iranica, 24(6), pp. 3132-3147. doi: 10.24200/sci.2017.4528
VANCOUVER
Rezaee, A., Zamani, B. A novel approach for automatic model-based test case generation. Scientia Iranica, 2017; 24(6): 3132-3147. doi: 10.24200/sci.2017.4528