Automated Test Case Generation as a Many-Objective Optimisation Problem with Dynamic Selection of the Targets

被引:207
作者
Panichella, Annibale [1 ]
Kifetew, Fitsum Meshesha [2 ]
Tonella, Paolo [2 ]
机构
[1] Univ Luxembourg, SnT, L-4365 Esch Sur Alzette, Luxembourg
[2] Fdn Bruno Kessler, Software Engn Unit, I-38122 Trento, Italy
关键词
Evolutionary testing; many-objective optimisation; automatic test case generation; EVOLUTIONARY ALGORITHMS;
D O I
10.1109/TSE.2017.2663435
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
The test case generation is intrinsically a multi-objective problem, since the goal is covering multiple test targets (e.g., branches). Existing search-based approaches either consider one target at a time or aggregate all targets into a single fitness function (whole-suite approach). Multi and many-objective optimisation algorithms (MOAs) have never been applied to this problem, because existing algorithms do not scale to the number of coverage objectives that are typically found in real-world software. In addition, the final goal for MOAs is to find alternative trade-off solutions in the objective space, while in test generation the interesting solutions are only those test cases covering one or more uncovered targets. In this paper, we present Dynamic Many-Objective Sorting Algorithm (DynaMOSA), a novel many-objective solver specifically designed to address the test case generation problem in the context of coverage testing. DynaMOSA extends our previous many-objective technique Many-Objective Sorting Algorithm (MOSA) with dynamic selection of the coverage targets based on the control dependency hierarchy. Such extension makes the approach more effective and efficient in case of limited search budget. We carried out an empirical study on 346 Java classes using three coverage criteria (i.e., statement, branch, and strong mutation coverage) to assess the performance of DynaMOSA with respect to the whole-suite approach (WS), its archive-based variant (WSA) and MOSA. The results show that DynaMOSA outperforms WSA in 28 percent of the classes for branch coverage (+8 percent more coverage on average) and in 27 percent of the classes for mutation coverage (+11 percent more killed mutants on average). It outperforms WS in 51 percent of the classes for statement coverage, leading to +11 percent more coverage on average. Moreover, DynaMOSA outperforms its predecessor MOSA for all the three coverage criteria in 19 percent of the classes with +8 percent more code coverage on average.
引用
收藏
页码:122 / 158
页数:37
相关论文
共 59 条
  • [1] Evolving Readable String Test Inputs Using a Natural Language Model to Reduce Human Oracle Cost
    Afshan, Sheeva
    McMinn, Phil
    Stevenson, Mark
    [J]. 2013 IEEE SIXTH INTERNATIONAL CONFERENCE ON SOFTWARE TESTING, VERIFICATION AND VALIDATION (ICST 2013), 2013, : 352 - 361
  • [2] [Anonymous], PRACTICAL NONPARAMET
  • [3] [Anonymous], 2013, P INT S SOFTWARE TES
  • [4] [Anonymous], 2013, Search Methodologies: Introductory Tutorials in Optimization and Decision Support Techniques, DOI DOI 10.1007/978-1-4614-6940-7_15
  • [5] Arcuri A, 2014, LECT NOTES COMPUT SC, V8636, P1
  • [6] Parameter tuning or default values? An empirical investigation in search-based software engineering
    Arcuri, Andrea
    Fraser, Gordon
    [J]. EMPIRICAL SOFTWARE ENGINEERING, 2013, 18 (03) : 594 - 623
  • [7] Baker R.D., 1995, Randomization Tests
  • [8] Baresel A., 2004, Software Engineering Notes, V29, P108, DOI 10.1145/1013886.1007527
  • [9] Baresi L., 2010, 2010 32nd International Conference on Software Engineering (ICSE), P281, DOI 10.1145/1810295.1810353
  • [10] Cadar C., 2008, Proceedings of the 8th USENIX conference on Operating systems design and implementation, OSDI'08, (USA), P209