Abstract
Maximum coverage with minimum testing time is the main objective of a test case generation activity which leads to a multi-objective problem. Search-Based Testing (SBT) technique is a demanding research area for test case generation. Researchers have applied various metaheuristic (searching) algorithms to generate efficient and effective test cases in many research works. Out of these existing search-based algorithms, Genetic Algorithm (GA) and Particle Swarm Optimization (PSO) are the most widely used algorithms in automatic test case generation. In this paper, a test case generation approach is proposed using Cuckoo Search (CS) algorithm. CS has a controlling feature, Lévy flights, which makes it more efficient in searching the best candidate solution. It helps to generate efficient test cases in terms of code coverage and execution time. In our proposed method, test cases are generated based on path coverage criteria. Fitness of a test case is evaluated using branch distance and approximation level combined functions. The result is compared with PSO and with its variant Adaptive PSO (APSO). The experimental result shows that both the algorithms give nearly equal to the same result. Though the results are nearly equal, the implementation of CS is simple as it requires only one parameter to be tuned.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Maragathavalli, P.: Search-based software test data generation using evolutionary computation. Int. J. Comput. Sci. Inf. Technol. 3(1), 213–223 (2011)
Sahoo, R.R., Ray, M.:Metaheuristic techniques for test case generation: a review. J. Inf. Technol. Res. 11(1), 158–171 (2018)
Harman, M., Jia, Y., Zhang, Y.:Achievements, open problems and challenges for search based software testing. In: Proceedings of IEEE 8th International Conference on Software Testing, Verification and Validation, pp 1–12 (2015)
Yang, X., Deb, S.: Cuckoo search via levy flights. In: Proceedings of the Nabic—World Congress on Nature & Biologically Inspired Computing, pp. 210–214 (2009)
Sharma, S., Rizvi, S.A.M., Sharma, V.: A framework for optimization of software test cases generation using cuckoo search algorithm. In: 9th International Conference on Cloud Computing, Data Science & Engineering (Confluence), pp. 282–286. IEEE (2019)
Khari, M., Kumar, P.: An effective meta-heuristic cuckoo search algorithm for test suite optimization. Informatica 41(3), 363–377 (2017)
Kumar, K.S., Muthukumarvel, A.: Optimal test suite selection using improved cuckoo search algorithm based on extensive testing constraints. Int. J. Appl. Eng. Res. 12(9), 1920–1928 (2017)
Srivastava, P.R., Varshney, A., Nama, P., Yang, X.S.: Software test effort estimation: a model based on cuckoo search. Int. J. Bio-Inspired Comput. 4(5), 278–285 (2012)
Panda, M., Dash, S.: Automatic test suite generation for object oriented programs using metaheuristic cuckoo search algorithm. Int. J. Control Theory Appl. 10(18) (2017)
Roshan, R., Porwal, R., Sharma, C.M.: Review of search based techniques in software testing. Int. J. Comput. Appl. 51(6), 42–45 (2012)
Baresel, A., Sthamer, H., Schmidt, M.: Fitness function design to improve evolutionary structural testing. In: Proceeding of the Genetic and Evolutionary Computation Conference, pp. 1329–1336 (2002)
Korel, B.: Automated software test data generation. IEEE Trans. Softw. Eng. 16(8), 870–879 (1990)
Chen, Y., Zhong, Y.., Shi, T., Liu, J.: Comparison of two fitness functions for GA-based path-oriented test data generation. In: Fifth International Conference on Natural Computation, IEEE Computer Society, pp. 177–181 (2009)
Wegener, J., Baresel, A., Sthamer, H.: Evolutionary test environment for automatic structural testing. Inf. Softw. Technol. 43, 841–854 (2001)
Srivastava, P.R., Singh, A.K., Kumhar, H., Jain, M.: Optimal test sequence generation in state based testing using cuckoo search. Int. J. Appl. Evol. Comput. (IJAEC) 3(3), 17–32 (2012)
Sahoo, R.R., Ray, M.: PSO based test case generation for critical path using improved combined fitness function. J. King Saud Univ.-Comput. Inf. Sci. (2019). https://doi.org/10.1016/j.jksuci.2019.09.010
Mall, R.: Fundamentals of software engineering. 5th edn. PHI Learning Pvt. Ltd (2018)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2021 Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Sahoo, R.R., Ray, M., Nayak, G. (2021). Test Case Generation Based on Search-Based Testing. In: Mishra, D., Buyya, R., Mohapatra, P., Patnaik, S. (eds) Intelligent and Cloud Computing. Smart Innovation, Systems and Technologies, vol 194. Springer, Singapore. https://doi.org/10.1007/978-981-15-5971-6_33
Download citation
DOI: https://doi.org/10.1007/978-981-15-5971-6_33
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-15-5970-9
Online ISBN: 978-981-15-5971-6
eBook Packages: Intelligent Technologies and RoboticsIntelligent Technologies and Robotics (R0)