Test data generation method based on multiple convergence direction adaptive PSO
Tóm tắt
Automated test data generation is a traditional technique for reducing the cost and time of software testing. Various metaheuristic techniques have been successfully applied for this task. In contrast to the typical metaheuristic algorithms applied for branch and path coverage, this study focused on low resource consumption and efficient information coverage for critical path coverage. First, we combined the characteristics of branch coverage and path coverage to determine a critical path based on quantified path scores. As a result, we constructed a fine-grained fitness function based on the uniform scale branch distance. Second, we proposed an adaptive particle swarm optimization (MCD-APSO) algorithm with multiple convergence directions to accelerate convergence and escape from local optima. The proposed MCD-APSO algorithm improved the global search ability by enriching the diversity of the particle swarm and enhancing the current evolutionary information use of the particles. Finally, to validate the performance of the MCD-APSO algorithm, we compared the proposed algorithm with six test-data generation algorithms on six normal-scale and six large-scale benchmark programs. The results showed that the MCD-APSO algorithm outperforms the benchmark programs regarding the mean number of iterations, total running time, and coverage failure probability.
Tài liệu tham khảo
Aghdam, Z. K., & Arasteh, B. (2017). An efficient method to generate test data for software structural testing using artificial bee colony optimization algorithm. International Journal of Software Engineering and Knowledge Engineering, 27(06), 951–966.
Ahmed, M. A., & Hermadi, I. (2008). GA-based multiple paths test data generator. Computers & Operations Research, 35(10), 3107–3124.
Beizer, B. (2003). Software testing techniques. Dreamtech Press.
Bidgoli, A. M., & Haghighi, H. (2020). Augmenting ant colony optimization with adaptive random testing to cover prime paths. Journal of Systems and Software, 161, 110495.
Dai, X., Gong, W., & Gu, Q. (2021). Automated test case generation based on differential evolution with node branch archive. Computers & Industrial Engineering, 156, 107290.
Dalal, S., & Solanki, K. (2018). Performance analysis of BCO-m-GA technique for test case selection. Indian Journal of Science and Technology, 8(1).
Ghaemi, A., & Arasteh, B. (2020). SFLA‐based heuristic method to generate software structural test data. Journal of Software: Evolution and Process, 32(1), e2228.
Ghiduk, A. S., Harrold, M. J., & Girgis, M. R. (2007) .Using genetic algorithms to aid test-data generation for data-flow coverage. In 14th Asia-Pacific Software Engineering Conference (APSEC'07) (pp. 41–48). IEEE.
Grano, G., Titov, T. V., Panichella, S., et al. (2019). Branch coverage prediction in automated testing. Journal of Software: Evolution and Process, 31(9), e2158.
Huang, H., Liu, F., Zhuo, X., et al. (2017). Differential evolution based on self-adaptive fitness function for automated test case generation. IEEE Computational Intelligence Magazine, 12(2), 46–55.
Huang, H., Liu, F., Yang, Z., et al. (2018). Automated test case generation based on differential evolution with relationship matrix for IFOGSIM toolkit. IEEE Transactions on Industrial Informatics, 14(11), 5005–5016.
Kumar, S., Yadav, D. K., & Khan, D. A. (2017). A novel approach to automate test data generation for data flow testing based on hybrid adaptive PSO-GA algorithm. International Journal of Advanced Intelligence Paradigms, 9(2–3), 278–312.
Lakshminarayana, P., & SureshKumar, T. V. (2021). Automatic generation and optimization of test case using hybrid cuckoo search and bee colony algorithm. Journal of Intelligent Systems, 30(1), 59–72.
Lv, X. W., Huang, S., Hui, Z. W., et al. (2018). Test cases generation for multiple paths based on PSO algorithm with metamorphic relations. IET Software, 12(4), 306–317.
Mahajan, M., Kumar, S., & Porwal, R. (2012). Applying genetic algorithm to increase the efficiency of a data flow-based test data generation approach. Acm Sigsoft Software Engineering Notes, 37(5), 1–5.
McMinn, P. (2011). Search-based software testing: Past, present and future. In 2011 IEEE Fourth International Conference on Software Testing, Verification and Validation Workshops (pp. 153–163). IEEE.
Palak, P., & Gulia, P. (2019). Hybrid swarm and GA based approach for software test case selection. International Journal of Electrical and Computer Engineering, 9(6), 4898.
Sahoo, R. R., & Ray, M. (2018). Metaheuristic techniques for test case generation: A review. Journal of Information Technology Research.
Sahoo, R. R., & Ray, M. (2020). PSO based test case generation for critical path using improved combined fitness function. Journal of King Saud University-Computer and Information Sciences, 32(4), 479–490.
Sahoo, R. K., Mohapatra, D. P., & Patra, M. R. (2017a). Model driven approach for test data optimization using activity diagram based on cuckoo search algorithm. International Journal of Information Technology and Computer Science, 9(10), 77–84.
Sahoo, R. K., Nanda, S. K., Mohapatra, D. P., et al. (2017b). Model driven test case optimization of UML combinational diagrams using hybrid bee colony algorithm. International Journal of Intelligent Systems and Applications, 11(6), 43.
Salahirad, A., Almulla, H., & Gay, G. (2019). Choosing the fitness function for the job: Automated generation of test suites that detect real faults. Software Testing, Verification and Reliability, 29(4–5), e1701.
Sharifipour, H., Shakeri, M., & Haghighi, H. (2018). Structural test data generation using a memetic ant colony optimization based on evolution strategies. Swarm and Evolutionary Computation, 40, 76–91.
Shi, J. J., Jiang, S. J., Han, H., et al. (2013). Adaptive particle swarm optimization algorithm and its application in test data generation. Acta Electronica Sinica, 41(8), 1555–1559.
Tao, X. M., Liu, F. R., Liu, Y., et al. (2012). Multi-scale cooperative mutation particle swarm optimization algorithm. Ruanjian Xuebao/Journal of Software, 23(7), 1805–1815.
Varshney, S., & Mehrotra, M. (2013). Search based software test data generation for structural testing: A perspective. ACM SIGSOFT Software Engineering Notes, 38(4), 1–6.
Zhu, X. M., & Yang, X. F. (2010). Software test data generation automatically based on improved adaptive particle swarm optimizer. In International Conference on Computational and Information Sciences (pp. 1300–1303). IEEE.