Abstract
An effective test suite can be desirable for its ability to protect the code when introducing changes aiming at providing further functionalities, for refactoring, etc. An ample test suite, while taking considerable resources and time to execute, could be as effective as a smaller one having the same code coverage. This paper proposes an approach to reduce the number of test cases needed while ensuring the same code coverage of a large test suite. The approach is totally automatic, comprising test cases generation, code coverage computation, and reduction on the number of test cases. For finding the minimum subset of test cases, the code coverage problem has been formulated as a Set Cover problem. Our solution is based on Integer Linear Programming and on the properties of the Control Flow Graph. We evaluated the proposed solution on four sample software systems. The results show a drastic reduction on the number of tests, hence their execution time.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
- 2.
- 3.
We consider the size of a family as its number of sets.
- 4.
For clarity of exposition we define the Set Cover ILP formalisation in the context of our test optimisation problem.
- 5.
- 6.
- 7.
References
Agitar one - automated JUnit generation. www.agitar.com/solutions/products/automated_junit_generation.html
Coffee4j - combinatorial test and fault characterization framework. coffee4j.github.io
Beck, K., Gamma, E.: Extreme Programming Explained: Embrace Change. Addison-Wesley Professional, Reading (2000)
Calvagna, A., Tramontana, E.: Automated conformance testing of java virtual machines. In: Proceedings of IEEE Conference on Complex, Intelligent, and Software Intensive Systems (CISIS), Taichung, Taiwan (2013)
Chen, Z., Zhang, X., Xu, B.: A degraded ILP approach for test suite reduction. In: Proceedings of SEKE (2008)
Feige, U.: A threshold of ln n for approximating set cover. J. ACM (JACM) 45(4), 634–652 (1998)
Fornaia, A., Mongiovì, M., Pappalardo, G., Tramontana, E.: A general powerful graph pattern matching system for data analysis. In: International Conference on Complex Networks and their Applications. Springer (2018)
Fraser, G., Arcuri, A.: EvoSuite: automatic test suite generation for object-oriented software. In: Proceedings of ACM SIGSOFT Symposium and European Conference on Foundations of Software Engineering (2011)
Gotlieb, A., Marijan, D.: Flower: optimal test suite reduction as a network maximum flow. In: Proceedings of ACM International Symposium on Software Testing and Analysis (2014)
Hsu, H.Y., Orso, A.: MINTS: a general framework and tool for supporting test-suite minimization. In: Proceedings of IEEE ICSE (2009)
Jatana, N., Suri, B., Kumar, P., Wadhwa, B.: Test suite reduction by mutation testing mapped to set cover problem. In: Proceedings of ACM International Conference on Information and Communication Technology for Competitive Strategies (2016)
Murphy, C., Zoomkawalla, Z., Narita, K.: Automatic test case generation and test suite reduction for closed-loop controller software. Technical report, University of Pennsylvania, Department of Computer and Information Science (2013)
Pacheco, C., Ernst, M.D.: Randoop: feedback-directed random testing for java. In: Proceedings of OOPSLA Companion (2007)
Panda, S., Mohapatra, D.P.: Regression test suite minimization using integer linear programming model. Softw. Pract. Exp. 47(11), 1539–1560 (2017)
Rothermel, G., Untch, R.H., Chu, C., Harrold, M.J.: Prioritizing test cases for regression testing. IEEE Trans. Softw. Eng. 27(10), 929–948 (2001)
Shamshiri, S., Just, R., Rojas, J.M., Fraser, G., McMinn, P., Arcuri, A.: Do automatically generated unit tests find real faults? An empirical study of effectiveness and challenges. In: Proceedings of IEEE/ACM ASE (2015)
Shu, G., Sun, B., Henderson, T.A., Podgurski, A.: JavaPDG: a new platform for program dependence analysis. In: Proceedings of IEEE International Conference on Software Testing, Verification and Validation (2013)
Tallam, S., Gupta, N.: A concept analysis inspired greedy algorithm for test suite minimization. ACM SIGSOFT Softw. Eng. Notes 31(1), 35–42 (2006)
Xu, S., Miao, H., Gao, H.: Test suite reduction using weighted set covering techniques. In: Proceedings of IEEE International Conference on Software Engineering, Artificial Intelligence, Networking and Parallel/Distributed Computing (2012)
Acknowledgement
This work is supported by the CLARA project, SCN 00451, funded by MIUR within the “Smart Cities and Communities and Social Innovation” initiative.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2020 Springer Nature Switzerland AG
About this paper
Cite this paper
Mongiovì, M., Fornaia, A., Tramontana, E. (2020). A Network-Based Approach for Reducing Test Suites While Maintaining Code Coverage. In: Cherifi, H., Gaito, S., Mendes, J., Moro, E., Rocha, L. (eds) Complex Networks and Their Applications VIII. COMPLEX NETWORKS 2019. Studies in Computational Intelligence, vol 882. Springer, Cham. https://doi.org/10.1007/978-3-030-36683-4_14
Download citation
DOI: https://doi.org/10.1007/978-3-030-36683-4_14
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-36682-7
Online ISBN: 978-3-030-36683-4
eBook Packages: Intelligent Technologies and RoboticsIntelligent Technologies and Robotics (R0)