Affiliation:
1. Bauman Moscow State Technical University, Moscow
Abstract
Testing is a time consuming and resource intensive task. Testing often takes about half of the total project development time.Hence, in recent times, a lot of studies have considered the issues of the process automation of creating and running tests. Recently, a lot of papers have been published in the field concerned. However, most of them use unit testing, in which the coverage of different program fragments occurs independently of each other. Therefore, the internal structure of the program was not taken into account.The article presents a method to build a test suite based on evolutionary algorithms that takes into account the features of the entire program, as a whole.Evolutionary algorithms are a class of optimization algorithms that has been widely developed lately, using the ideas of artificial intelligence and intended for conducting directed search. They allow successful solving the problems of software testing, such as testing embedded systems and automatic construction of unit tests.With implementing evolutionary approach the article has solved the following tasks. Proposed a method for determining the fitness function, which allows us to consider an approximation along all possible trajectories, which provides a solution to the problem of coverage in almost any case. However, the number of such trajectories can be quite large, which leads to a significant increase in test execution time. Proposed a method of approximation along all possible trajectories, allowing testing to be done in a reasonable time. Time costs to achieve the goal are reduced by selecting such a trajectory among all possible ones for which a distance value to the instruction is minimal.To study the proposed method, there were four different tasks each of which involved about 1000 runs. The presented research results have shown that the given method is more reliable than the commonly used approaches in which the reference trajectory is selected. In addition, an estimate of time costs has shown that the discussed method has higher efficiency.
Subject
General Earth and Planetary Sciences,General Environmental Science
Reference11 articles.
1. Skobtsov Ju.А. Osnovy evolyutsionnykh vychislenij [Fundamentals of evolutionary computation]: a textbook. Donetsk: Donetsk National Technical Univ. Publ., 2008. 326 p. (in Russian).
2. Weiser M.D., Gannon J.D., McMullin P.R. Comparison of structural test coverage metrics. IEEE Software, 1985, vol. 2, no. 2, pp. 80—85. DOI: 10.1109/MS.1985.230356
3. Harman M., Mansouri S.A., Yuanyuan Zhang. Search-based software engineering: Trends, techniques and applications. ACM Computing Surveys, 2012, vol. 45, no.1, article no. 11. DOI: 10.1145/2379776.2379787
4. McMinn P. Search-based software test data generation: A survey. Software Testing, Verification and Reliability, 2004, vol. 14, no. 2, pp. 105—156. DOI: 10.1002/stvr.294
5. Harman M., McMinn P. A theoretical and empirical analysis of evolutionary testing and hill climbing for structural test data generation. Intern. symp. on software testing and analysis: ISSTA 2007 (London, UK, July 9-12, 2007): Proc. N.Y.: ACM, 2007. Pp. 73—83. DOI: 10.1145/1273463.1273475