摘要
Web应用测试用例生成并行化是提升Web应用测试生成效率的一个有效手段.Web应用的前后端分离、事件驱动等特性,导致传统的并行化技术难以直接应用于Web应用的测试用例自动生成中.因此,如何针对Web应用进行并行化测试用例生成,是一项具有挑战性的工作.将种群并行化计算引入到基于遗传算法的Web应用前后端融合的测试用例生成中,通过线程池及调度逻辑设计、多浏览器进程管理及后端覆盖路径获取,实现种群个体在多浏览器上的并行化执行及基于后端路径覆盖的适应度值并行化计算,以更高效地生成Web应用的测试用例.实验结果表明:相对于Web应用的GA串行化测试用例生成方法,所提的并行化测试生成方法能够更充分地利用系统资源,极大地提升Web应用测试用例的生成效率.
Parallelization of test case generation for Web applications is an effective way to improve the efficiency of test generation. Due to the characteristics of front-back end separation and event-driven of Web applications, the traditional parallelization technology is difficult to be applied to automatic test case generation of Web applications. Therefore, it becomes a challenging task to parallelize test case generation for Web applications. In this study, parallelized computing is introduced into the test case generation for Web applications based on GA. By means of the design of thread pool and scheduling logic, the management of the multi-browser process and the acquisition of the path coverage of back end code, the parallel execution of individuals on multiple browsers and the parallel computation of fitness values based on the back end path coverage are realized, making test case generation more efficiently. The experiment results show that compared with GA serialization test case generation, the proposed parallelization method can make full use of system resources and greatly improve the efficiency of test case generation for Web applications.
作者
王微微
李奕超
赵瑞莲
李征
WANG Wei-Wei;LI Yi-Chao;ZHAO Rui-Lian;LI Zheng(School of Information Science and Technology,Beijing University of Chemical Technology,Beijing 100029,China)
出处
《软件学报》
EI
CSCD
北大核心
2020年第5期1314-1331,共18页
Journal of Software
基金
国家自然科学基金(61672085,61702029,61872026)。
关键词
WEB应用测试
测试用例生成
遗传算法
并行化
敏感路径
Web application testing
test case generation
genetic algorithms
parallelization
sensitive path