Nothing Special   »   [go: up one dir, main page]

Skip to main content
Log in

A class integration test order generation approach based on Sarsa algorithm

  • Published:
Automated Software Engineering Aims and scope Submit manuscript

A Correction to this article was published on 02 January 2024

This article has been updated

Abstract

Class integration test order generation is a key step in integration testing, researching this problem can help find unknown bugs and improve the efficiency of software testing. The challenge of this problem is ordering the classes to be integrated to minimize the cost of required stubs. However, the existing approaches of generating class integration test orders cannot satisfy this requirement well. Considering the excellent performance of reinforcement learning in sequence decision problems, this paper proposes a class integration test order generation approach based on Sarsa algorithm, which is a data-driven model-free reinforcement learning algorithm. This approach takes the stubbing complexity as the indicator to evaluate the stubbing cost and uses it to measure the quality of a class integration test order. The Sarsa algorithm is used to train the agent, and three indicators such as test return, dependency complexity, and the number of cycles are integrated into the design of the reward function to evaluate the merits of the current action. By recording an action path of the agent from its initial state to its termination state, a class integration test order can be obtained. The experimental results on 10 systems show that the class integration test order generation approach based on Sarsa algorithm can generate the class integration test orders with lower stubbing cost.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Algorithm 1
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9

Similar content being viewed by others

Explore related subjects

Discover the latest articles, news and stories from top researchers in related subjects.

Change history

References

  • Abdurazik, A., Offutt, J.: Coupling-based class integration and test order. In: Proceedings of 2006 International Workshop on Automation of Software Test. ACM, pp 50–56 (2006)

  • Abdurazik, A., Offutt, J.: Using coupling-based weights for the class integration and test order problem. Comput. J. 52(5), 557–570 (2009)

    Article  Google Scholar 

  • Bansal P., Sabharwal S., Sidhu P.: An investigation of strategies for finding test order during integration testing of object oriented applications. In: Proceeding of the 2009 International Conference on Methods and Models in Computer Science IEEE, pp 1–8 (2009)

  • Borner L., Paech B.: Integration test order strategies to consider test focus and simulation effort. In: Proceedings of the 2009 IEEE 1st International Conference on Advances in System Testing and Validation Lifecycle, IEEE, pp 80–85 (2009)

  • Briand L., Feng J., Labiche Y.: Using genetic algorithms and coupling measures to devise optimal integration test orders. In: Proceedings of the 14th International Conference on Software Engineering and Knowledge Engineering, pp 43–50 (2002)

  • Briand L., Labiche Y., Wang Y.: Revisiting strategies for ordering class integration testing in the presence of dependency cycles. In: Proceedings of the 12th International Symposium on Software Reliability Engineering, IEEE, pp 287–296 (2001)

  • Briand, L., Labiche, Y., Wang, Y.: An investigation of graph-based class integration test order strategies. IEEE Trans. Softw. Eng. 29(7), 594–607 (2003)

    Article  Google Scholar 

  • Burke E., Hyde M., Kendall G., et al.: A Survey of Hyper-Heuristics. Office for Official Publications of the European Communities (2009)

  • Cabral R., Pozo A., Vergilio S.: A pareto ant colony algorithm applied to the class integration and test order problem. In: Proceedings of the 22nd IFIP WG 6.1 International Conference on Testing Software and Systems, Springer, pp 16–29 (2010)

  • Chidamber, S., Kemerer, C.: A metrics suite for object oriented design. IEEE Trans. Softw. Eng. 20(6), 476–493 (1994)

    Article  Google Scholar 

  • Czibula, G., Czibula, I., Marian, Z.: An effective approach for determining the class integration test order using reinforcement learning. Appl. Soft Comput. 65(4), 517–530 (2018)

    Article  Google Scholar 

  • Ding, Y., Zhang, Y., Jiang, S., et al.: Generation method of class integration test order based on reinforcement learning. J. Softw. 33(5), 1674–1698 (2022)

    Google Scholar 

  • Gao, Y., Chen, S., Lu, X.: Research on reinforcement learning technology: A review. ACTA Autom. Sin. 30(1), 86–100 (2004)

    MathSciNet  Google Scholar 

  • Gao, H., Feng, B., Li, Y., et al.: Improved inter-class integration testing sequence algorithm based on extended ORD. J. Chin. Comput. Syst. 28(4), 725–728 (2007)

    Google Scholar 

  • Guizzo G., Fritsche G., Vergilio S., et al.: A hyper-heuristic for the multi-objective integration and test order problem. In: Proceedings of the 2015 Annual Conference on Genetic and Evolutionary Computation. ACM, pp 1343–1350 (2015)

  • Hanh V., Akif K., Traon Y., et al.: Selecting an efficient OO integration testing strategy: an experimental comparison of actual strategies. In: Proceedings of the 15th European Conference on Object-Oriented Programming. Springer, pp 381–401 (2001)

  • Harman M., Burke E., Clark J., et al.: Dynamic adaptive search based software engineering. In: Proceedings of the ACM-IEEE International Symposium on Empirical Software Engineering and Measurement. ACM, New York, pp 1–8 (2012)

  • Hashim N., Schmidt H., Ramakrishnan S.: Test order for class-based integration testing of java applications. In: Proceedings of the 5th Internation Conference on Quality Software. IEEE, pp 11–18 (2005)

  • He, L., Yang, Y., Li, Z., et al.: Reward of reinforcement learning of test optimization for continuous integration. J. Softw. 30(5), 1438–1449 (2019)

    Google Scholar 

  • Jiang, S., Zhang, Y., Ding, Y.: An approach for inter-class integration test order determination based on coupling measures. Chin. J. Comput. 34(6), 1062–1074 (2011)

    Article  Google Scholar 

  • Jiang, S., Zhang, M., Zhang, Y., et al.: An integration test order strategy to consider control coupling. IEEE Trans. Softw. Eng. 47(7), 1350–1367 (2021)

    Article  Google Scholar 

  • Kung D., Gao J., Hsia P., et al.: A test strategy for object-oriented programs. In: Proceedings of the 19th Annual International Computer Software and Applications Conference. IEEE, pp 239–244 (1995b)

  • Kung, D., Gao, J., Hsia, P., et al.: Class firewall, test order, and regression testing of object-oriented programs. J. Obj. Oriented Program. 8(2), 51–65 (1995)

    Google Scholar 

  • Labiche Y., Thevenod-Fosse P., Waeselynck H., et al.: Testing levels for object-oriented software. In: Proceedings of the 22nd International Conference on Software Engineering, pp 136–145 (2000)

  • LeTraon, Y., Jeron, T., Jezequel, J., et al.: Efficient object-oriented integration and regression testing. IEEE Trans. Reliab. 49(1), 12–25 (2000)

    Article  Google Scholar 

  • Li, Y., Zhou, G., Liu, F.: An improved algorithm for testing order between classes. Comput. Eng. 36(8), 74–75 (2010)

    Google Scholar 

  • Lu, Y., Mao, C.: Method of inter-class test order determination for object-oriented cluster level testing. J. Chin. Comput. Syst. 26(6), 995 (2005)

    Google Scholar 

  • Ma, A., Yu, Y., Yang, S.: Survey of knowledge graph based on reinforcement learning. J. Comput. Res. Dev. 59, 8 (2022)

    Google Scholar 

  • Mao C., Lu Y.: Aicto: an improved algorithm for planning inter-class test order. In: Proceedings of the 5th International Conference on Computer and Information Technology. IEEE, pp 927–931 (2005)

  • Mariani T., Guizzo G., Vergilio S., et al.: Grammatical evolution for the multi-objective integration and test order problem. In: Proceedings of the Genetic and Evolutionary Computation Conference 2016, pp 1069–1076 (2016)

  • Meng, J., Jiang, X., Chen, X., et al.: Intelligent control strategy of urban rail train based on sarsa algorithm. Railway Stand. Design 12, 1–8 (2023)

    Google Scholar 

  • Paradkar A.: Inter-class testing of OO software in the presence of polymorphism. In: Proceedings of the 1996 Conference of the Centre for Advanced Studies on Collaborative Research (1996)

  • Tai K., Daniels F.: Test order for inter-class integration testing of object-oriented software. In: Proceedings of the 21st Annual International Computer Software and Applications Conference. IEEE, pp 602–607 (1997)

  • Tarjan R.: Depth-first search and linear graph algorithms. In: Proceedings of the 12th Annual Symposium on Switching and Automata Theory (1971)

  • Vergilio, S., Pozo, A., Árias, J., et al.: Multi-objective optimization algorithms applied to the class integration and test order problem. Int. J. Softw. Tools Technol. Transf. 14, 461–475 (2012)

    Article  Google Scholar 

  • Wang Z., Li B., Wang L., et al.: A brief survey on automatic integration test order generation. In: Proceedings of the 23rd International Conference on Software Engineering and Knowledge Engineering, pp 254–257 (2011a)

  • Wang Z., Li B., Wang L., et al.: An effective approach for automatic generation of class integration test order. In: Proceedings of the 2011 IEEE 35th Annual Computer Software and Applications Conference. IEEE, pp 680–681 (2011b)

  • Wang Z., Li B., Wang L., et al.: Using coupling measure technique and random iterative algorithm for inter-class integration test order problem. In: Proceedings of the 34th Annual IEEE International Computer Software and Applications Conferencel. IEEE, pp 329–334 (2010)

  • Wang, H., Liu, Y.: Information System Analysis and Design. Nanjing University, Boston (2021)

    Google Scholar 

  • Wang, Y., Yu, H., Zhu, Z.: A class integration test order method based on the node inportance of software. J. Comput. Res. Dev. 53(3), 517–530 (2016)

    Google Scholar 

  • Yan, X., Yan, K., Rehman, M., et al.: Impersonation attack detection in mobile edge computing by levering sarsa technique in physical layer security. Appl. Sci. 12(20), 10–225 (2022)

    Article  Google Scholar 

  • Yang, Z., Li, Y.: A study of the current situation and sustainable development of folk sports activities in western yunnan border areas. J. Baoshan Univ. 35(5), 5 (2016)

    Google Scholar 

  • Zhang M., Keung J., Xiao Y., et al.: A heuristic approach to break cycles for the class integration test order generation. In: Proceedings of the 2019 IEEE 43rd Annual Computer Software and Applications Conferencel. IEEE, pp 47–52 (2019)

  • Zhang, M., Jiang, S., Zhang, Y.: Research on multi-objective optimization in class integration test order. J. Chin. Comput. Syst. 38(8), 1772–1777 (2017)

    Google Scholar 

  • Zhang, M., Jiang, S., Zhang, Y., et al.: A multi-level feedback approach for the class integration and test order problem. J. Syst. Softw. 133, 54–67 (2017)

    Article  Google Scholar 

  • Zhang, Y., Jiang, S., Chen, R., et al.: Class integration testing order determination method based on particle swarm optimization algorithm. Chin. J. Comput. 41(4), 931–945 (2018)

    Google Scholar 

  • Zhang, Y., Jiang, S., Zhang, M., et al.: Survey of class test order generation techniques for integration test. Chin. J. Comput. 41(3), 670–694 (2018)

    Google Scholar 

  • Zhang, M., Keung, J., Xiao, Y., et al.: Evaluating the effects of similar-class combination on class integration test order generation. Inf. Softw. Technol. 129, 106–438 (2021)

    Article  Google Scholar 

  • Zhang, Y., Zhang, Y., Zhang, Z., et al.: Generation method of class integration test order based on deep reinforcement learning. Acta Electr. Sin. 51, 455–466 (2023)

    Google Scholar 

  • Zhao, Y., Wang, Y., Yu, H., et al.: An inter-class integration test order generation method based on complex networks. J. Northeast. Univ. 36(12), 1696–1700 (2015)

    Google Scholar 

  • Zhou Z.: Machine Learning. Tsinghua University Press pp 371–397 (2016)

Download references

Acknowledgements

This work is supported by the Fundamental Research Funds for the Xuzhou Science and Technology Project under grant No. KC22047; the National Natural Science Foundation of China under grant No. 71774159, 61673384; the Postdoctoral Foundation of China under grant No. 2021T140707.

Author information

Authors and Affiliations

Authors

Contributions

Y.L. performed the experiment, analyzed the data, and wrote the manuscript; Y.Z. designed the methodology and made significant contributions to the manuscript preparation and analysis; Y.D. performed the data curation and analysis; S.J. and G.Y. performed the analysis with constructive discussions. All authors reviewed the manuscript.

Corresponding author

Correspondence to Yanmei Zhang.

Ethics declarations

Conflict of interest

The authors declare no competing interests.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

The original online version of this article was revised: Grammatical errors has been corrected throughout the article.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Li, Y., Zhang, Y., Ding, Y. et al. A class integration test order generation approach based on Sarsa algorithm. Autom Softw Eng 31, 7 (2024). https://doi.org/10.1007/s10515-023-00406-9

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s10515-023-00406-9

Keywords

Navigation