摘要
UML已经成为建模语言的事实标准,如何从UML模型生成测试用例为面向对象软件测试带来了新的挑战。为测试用例提供测试数据是其中的关键环节。ShaukatAli等人在UML基础上提出SCOTEM模型,但是该模型的测试数据需要人工生成。针对SCOTEM模型进行了改进使其适于灰盒测试,以OCL约束测试数据的生成和运行结果的验证,并提出了一种为基于粒子群算法的改进SCOTEM模型自动生成测试数据的方法。针对不同的覆盖标准,试验结果表明,该方法能够以更高的效率生成高质量的测试数据。
The unified modeling language (UML) has emerged as the defacto standard for analysis and design of OO systems. Generation of test cases bring challenges to OO software test. And providing test data for test cases is a key point. Shaukat Ali present an UML- based model called SCOTEM. But test data needs to be generated manually. An improvement is made to SCOTEM to adapt to greybox testing. OCL is used to constrain test data generation and test result validation, and an approach is proposed to generate test data for the enhanced SCOTEM based on particle swarm optimization algorithm. The experimental results show that it can generate higher quality test data more efficiently under different coverage criterion.
出处
《计算机工程与设计》
CSCD
北大核心
2009年第2期411-413,共3页
Computer Engineering and Design