Simulink model testing method based on program mutation
-
摘要: 为解决当前Simulink模型变异测试中测试执行开销大、测试用例生成效率低等问题,首先根据当前的Simulink模型变异算子集,基于程序变异技术提出了Simulink模型的变异测试过程和一组改进变异算子集.实验表明,在不影响测试用例集变异评分的情况下,该组变异算子集能够有效减少变异模型的生成数量,从而降低测试开销.其次,设计了一种基于搜索的Simulink模型变异测试用例生成方法,该方法将变异模型的测试用例生成问题转换为目标函数极小化问题,通过模拟退火算法对目标函数寻优,最终搜索出能够杀死该变异模型的测试用例.最后,将该方法应用于典型案例,验证了方法的正确性和有效性.
-
关键词:
- 软件测试 /
- 程序变异 /
- Simulink模型测试 /
- 测试用例生成 /
- 模拟退火算法
Abstract: In order to solve the current problems (expensive testing cost and low efficiency of test case generation) in mutation test for Simulink models, a mutation testing process and an optimized set of mutation operators were proposed for Simulink models based on program mutation according to the current mutation operators for the Simulink models. Experiments show that this set of mutation operators can effectively reduce the generation number of mutation models without prejudice to the mutation score of testing case set, thus it will effectively save the testing cost. Then a search-based test case generation method for Simulink models mutation testing was described. The test case generation problem was transformed into the objective function minimization problem, and the test cases which can kill the mutation models were ultimately obtained through the optimization of objective function by algorithm of simulated annealing. Finally, the application of a typical case for the method verified the correctness and effectiveness. -
[1] Molina J M, Pan X,Grimm C,et al.A framework for model-based design of embedded systems for energy management[C]//Modeling and Simulation of Cyber-Physical Energy Systems(MSCPES).Piscataway,NJ:IEEE,2013:1-6. [2] He N, Rümmer P,Kroening D.Test-case generation for embedded Simulink via formal concept analysis[C]//Proceedings of the 48th Design Automation Conference.New York:ACM,2011:224-229. [3] DeMillo R A, Lipton R J,Sayward F G.Hints on test data selection:help for the practicing programmer[J].Computer,1978,11(4): 34-41. [4] Jia Y, Harman M.An analysis and survey of the development of mutation testing[J].IEEE Transactions on Software Engineering,2011,37(5):649-678. [5] King K N, Offutt A J.A fortran language system for mutation-based software testing[J].Software:Practice and Experience,1991,21(7):685-718. [6] Mathur A P. Performance,effectiveness,and reliability issues in software testing[C]//15th Annual International Computer Software and Applications Conference.New York:IEEE,1991:604-605. [7] Offutt A J, Rothermel G,Zapf C.An experimental evaluation of selective mutation[C]//Proceedings of the 15th International Conference on Software Engineering.Piscataway,NJ:IEEE Computer Society Press,1993:100-107. [8] Offutt A J, Lee A,Rothermel G,et al.An experimental determination of sufficient mutant operators[J].ACM Transactions on Software Engineering and Methodology(TOSEM),1996,5(2):99-118. [9] Barbosa E F, Maldonado J C,Vincenzi A M R.Toward the determination of sufficient mutant operators for C[J].Software Testing,Verification and Reliability,2001,11(2):113-136. [10] Binh N T. Mutation operators for Simulink models[C]//Knowledge and Systems Engineering(KSE),2012 Fourth International Conference on.Piscataway,NJ:IEEE,2012:54-59. [11] Zhan Y, Clark J.Search based automatic test-data generation at an architectural level[C]//Genetic and Evolutionary Computation-GECCO 2004.Berlin:Springer,2004:1413-1424. [12] 邓绍鹏,杨志义, 王宇英.基于搜索的Simulink测试数据生成[J].计算机应用研究,2012,29(7):2527-2530. Deng S P,Yang Z Y,Wang Y Y.Search-based test-data generation for Simulink[J].Application Research of Computers,2012,29(7):2527-2530(in Chinese). [13] Bottaci L. Predicate expression cost functions to guide evolutionary search for test data[C]//Genetic and Evolutionary Computation—GECCO 2003.Berlin:Springer,2003:2455-2464. [14] Zhan Y, Clark J A.Search-based mutation testing for Simulink models[C]//Proceedings of the 2005 Conference on Genetic and Evolutionary Computation.New York:ACM,2005:1061-1068. [15] McMinn P. Search-based software test data generation:a survey[J].Software Testing,Verification and Reliability,2004,14(2): 105-156.
点击查看大图
计量
- 文章访问数: 1567
- HTML全文浏览量: 80
- PDF下载量: 664
- 被引次数: 0