Abstract
The application of genetic algorithms in automatically generating test data has become a research hotspot and produced many results in recent years. However, its applicability is limited in the presence of flag variables. This issue, known as the flag problem, has been studied by many researchers to date. We propose a novel method of testability transformation to tackle the flag problem. Different from traditional transformation methods, in our method, the key step is not the transformation of source code, but that of target statements. We search for a new target statement (or a set of target statements) equivalent to the original one and then transform the problem of generating test data that cover the original target statement into the one that cover the new target statement (or a set of target statements). We apply our method in many real-world programs, and the experimental results show its effectiveness.
Similar content being viewed by others
References
Botella B, Gotlieb A, Michel C (2006) Symbolic execution of floating-point computations. Softw Test Verif Reliab 16(2):97–121
Ribeiro JCB, Zenha-Rela MA, de Vega FF (2009) Test case evaluation and input domain reduction strategies for the evolutionary testing of object-oriented software. Inf Softw Technol 51(11):1534–1548
Miller W, Spooner DL (1976) Automatic generation of floating point test data. IEEE Trans Softw Eng 2(3):223–226
Korel B (1990) Automated software test data generation. IEEE Trans Softw Eng 16(8):870–879
Blanco R, Tuya J, Adenso-Dłaz B (2009) Automated test data generation using a scatter search approach. Inf Softw Technol 51:708–720
Miller J, Reformat M, Zhang H (2006) Automatic test data generation using genetic algorithm and program dependence graphs. Inf Softw Technol 48:586–605
Watkins A, Hufnagel EM (2006) Evolutionary test data generation: a comparison of fitness functions. Softw Pract Exp 36:95–116
Bühler O, Wegener J (2008) Evolutionary functional testing. Comput Oper Res 35(10):3144–3160
McMinn P (2005) Evolutionary search for test data in the presence of state behaviour. Ph.D Thesis
Harman M, Hu L, Hierons R, Baresel A, Sthamer H (2002) Improving evolutionary testing by flag removal. In: Proceedings of the Genetic and Evolutionary Computation Conference (GECCO). pp 1359–1366
Baresel A, Sthamer H (2003) Evolutionary testing of flag conditions. Proceedings of the Genetic and Evolutionary Computation Conference (GECCO). pp 2442–2454
Do H, Elbaum S, Rothermel G (2005) Supporting controlled experimentation with testing techniques: an infrastructure and its potential impact. Empir Softw Eng 10(4):405–435
Harman M, Hu L et al (2004) Testability transformation. IEEE Trans Softw Eng 30(1):3–16
Bottaci L (2002) Instrumenting programs with flag variables for test data search by genetic algorithms. In: Proceedings of the Genetic and Evolutionary Computation Conference (GECCO). pp 1337–1342
Liu X, Liu H, Wang B, Chen P, Cai X (2005) A unified fitness function calculation rule for flag conditions to improve evolutionary testing. In: Proceedings of the 20th IEEE/ACM international conference on Automated Software Engineering (ASE). pp 337–341
McMinn P, Holcombe M (2006) Evolutionary testing using an extended chaining approach. Evol Comput 14(1):41–64
Wappler S, Wegener J, Baresel A (2009) Evolutionary testing of software with function-assigned flags. J Syst Softw 82:1767–1779
Binkley DW, Harman M, Lakhotia K (2009) FlagRemover: a testability transformation for transforming loop assigned flags. ACM Trans Softw Eng Methodol 2(3):110–146
Jiang S, Lu Y (2008) Evolutionary testing of unstructured programs using a testability transformation approach. In: Proceedings of Japan-China joint workshop on frontier of computer science and technology. pp 59–66
McMinn P, Binkley D, Harman M (2009) Empirical evaluation of a nesting testability transformation for evolutionary testing. ACM Trans Softw Eng Methodol 18(3):1–26
Lammermann F, Baresel A, Wegener J (2008) Evaluating evolutionary testability for structure-oriented testing with software measurements. Appl Soft Comput 8(2):1018–1028
Halstead M (1977) Elements of software science. Prentice Hall, New York
Gong DW, Yao XJ, Xia M (2009) Automatic determination of branch correlations in software test. In: Proceedings of the 2009 world congress on software engineering. pp 211–215
Acknowledgments
This work is jointly funded by Natural Science Foundation of China (No. 61075061), Natural Science Foundation of Jiangsu Province (No. BK2010187), Six Peak Talents Projects of Jiangsu Province (No. 2008125), and Youth Research Foundation of China University of Mining and Technology (No. 2008A034).
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Gong, D., Yao, X. Testability transformation based on equivalence of target statements. Neural Comput & Applic 21, 1871–1882 (2012). https://doi.org/10.1007/s00521-011-0568-8
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00521-011-0568-8