[go: up one dir, main page]

skip to main content
10.1145/3460319.3464824acmconferencesArticle/Chapter ViewAbstractPublication PagesisstaConference Proceedingsconference-collections
research-article
Open access

Log-based slicing for system-level test cases

Published: 11 July 2021 Publication History

Abstract

Regression testing is arguably one of the most important activities in software testing. However, its cost-effectiveness and usefulness can be largely impaired by complex system test cases that are poorly designed (e.g., test cases containing multiple test scenarios combined into a single test case) and that require a large amount of time and resources to run. One way to mitigate this issue is decomposing such system test cases into smaller, separate test cases---each of them with only one test scenario and with its corresponding assertions---so that the execution time of the decomposed test cases is lower than the original test cases, while the test effectiveness of the original test cases is preserved. This decomposition can be achieved with program slicing techniques, since test cases are software programs too. However, existing static and dynamic slicing techniques exhibit limitations when (1) the test cases use external resources, (2) code instrumentation is not a viable option, and (3) test execution is expensive.
In this paper, we propose a novel approach, called DS3 (Decomposing System teSt caSe), which automatically decomposes a complex system test case into separate test case slices. The idea is to use test case execution logs, obtained from past regression testing sessions, to identify "hidden" dependencies in the slices generated by static slicing. Since logs include run-time information about the system under test, we can use them to extract access and usage of global resources and refine the slices generated by static slicing.
We evaluated DS3 in terms of slicing effectiveness and compared it with a vanilla static slicing tool. We also compared the slices obtained by DS3 with the corresponding original system test cases, in terms of test efficiency and effectiveness. The evaluation results on one proprietary system and one open-source system show that DS3 is able to accurately identify the dependencies related to the usage of global resources, which vanilla static slicing misses. Moreover, the generated test case slices are, on average, 3.56 times faster than original system test cases and they exhibit no significant loss in terms of fault detection effectiveness.

References

[1]
Raja Ben Abdessalem, Annibale Panichella, Shiva Nejati, Lionel C Briand, and Thomas Stifter. 2018. Testing autonomous cars for feature interaction failures using many-objective search. In Proceedings of the 33rd International Conference on Automated Software Engineering (ASE). IEEE, New York, NY, USA. 143–154. https://doi.org/10.1145/3238147.3238192
[2]
Thomas Bach, Ralf Pannemans, Johannes Haeussler, and Artur Andrzejak. 2019. Dynamic unit test extraction via time travel debugging for test cost reduction. In Proceedings of the 41st International Conference on Software Engineering: Companion Proceedings (ICSE-Companion). ACM, New York, NY, USA. 238–239. https://doi.org/10.1109/ICSE-Companion.2019.00093
[3]
Gabriele Bavota, Abdallah Qusef, Rocco Oliveto, Andrea De Lucia, and Dave Binkley. 2015. Are test smells really harmful? An empirical study. Empirical Software Engineering, 20, 4 (2015), 1052–1094.
[4]
David Binkley, Nicolas Gold, Mark Harman, Syed Islam, Jens Krinke, and Shin Yoo. 2014. ORBS: Language-independent program slicing. In Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering. Association for Computing Machinery, 109–120. https://doi.org/10.1145/2635868.2635893
[5]
Thierry Titcheu Chekam, Mike Papadakis, Yves Le Traon, and Mark Harman. 2017. An Empirical Study on Mutation, Statement and Branch Coverage Fault Revelation That Avoids the Unreliable Clean Program Assumption. In Proceedings of the 39th International Conference on Software Engineering (ICSE). IEEE, New York, NY, USA. 597–608. https://doi.org/10.1109/ICSE.2017.61
[6]
W. J. Conover. 1998. Practical Nonparametric Statistics (3rd edition ed.). Wiley, New York, NY, USA.
[7]
Sebastian Elbaum, Hui Nee Chin, Matthew B Dwyer, and Jonathan Dokulil. 2006. Carving differential unit test cases from system test cases. In Proceedings of the 14th ACM SIGSOFT international symposium on Foundations of software engineering. Association for Computing Machinery, New York, NY, USA. 253–264. https://doi.org/10.1145/1181775.1181806
[8]
R. Gopinath, C. Jensen, and A. Groce. 2014. Mutations: How Close are they to Real Faults? In Proceeding of the 25th International Symposium on Software Reliability Engineering (ISSRE). IEEE, Los Alamitos, CA, USA. 189–200. https://doi.org/10.1109/ISSRE.2014.40
[9]
Ines Hajri, Arda Goknil, Fabrizio Pastore, and Lionel C Briand. 2020. Automating system test case classification and prioritization for use case-driven testing in product lines. Empirical Software Engineering, 25, 5 (2020), 3711–3769. https://doi.org/10.1007/s10664-020-09853-4
[10]
P. He, J. Zhu, Z. Zheng, and M. R. Lyu. 2017. Drain: An Online Log Parsing Approach with Fixed Depth Tree. In Proceedings of the International Conference on Web Services (ICWS). IEEE Press, Piscataway, NJ, USA. 33–40. https://doi.org/10.1109/ICWS.2017.13
[11]
Yue Jia and Mark Harman. 2010. An analysis and survey of the development of mutation testing. IEEE transactions on software engineering, 37, 5 (2010), 649–678. https://doi.org/10.1109/TSE.2010.62
[12]
M. Jorde, S. Elbaum, and M. B. Dwyer. 2008. Increasing Test Granularity by Aggregating Unit Tests. In Proceedings of the 23rd IEEE/ACM International Conference on Automated Software Engineering (ASE 2008). ACM, New York, NY, USA. 9–18. https://doi.org/10.1109/ASE.2008.11
[13]
[n.d.]. JSBSim. https://github.com/JSBSim-Team/jsbsim
[14]
René Just, Darioush Jalali, Laura Inozemtseva, Michael D. Ernst, Reid Holmes, and Gordon Fraser. 2014. Are Mutants a Valid Substitute for Real Faults in Software Testing? In Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering. Association for Computing Machinery, New York, NY, USA. 654–665. https://doi.org/10.1145/2635868.2635929
[15]
Alexander Kampmann and Andreas Zeller. 2019. Carving parameterized unit tests. In Proceedings of the 41st International Conference on Software Engineering: Companion Proceedings (ICSE-Companion). ACM, New York, NY, USA. 248–249. https://doi.org/10.1109/ICSE-Companion.2019.00098
[16]
Bogdan Korel and Janusz Laski. 1988. Dynamic program slicing. Information processing letters, 29, 3 (1988), 155–163. https://doi.org/10.1145/93548.93576
[17]
Huan Lin, Yawen Wang, and Yunzhan Gong. 2018. Subsuming Mutation Operators. In Proceedings of the 40th International Conference on Software Engineering: Companion Proceedings (ICSE-Companion). ACM, New York, NY, USA. 236–237.
[18]
Niels Lohmann. [n.d.]. Mutate++. https://github.com/nlohmann/mutate_cpp
[19]
Qingzhou Luo, Farah Hariri, Lamyaa Eloussi, and Darko Marinov. 2014. An empirical analysis of flaky tests. In Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering. Association for Computing Machinery, New York, NY, USA. 643–653. https://doi.org/10.1145/2635868.2635920
[20]
Rogério Marinke, Eduardo Martins Guerra, Fábio Fagundes Silveira, Rafael Monico Azevedo, Wagner Nascimento, Rodrigo Simões de Almeida, Bruno Rodrigues Demboscki, and Tiago Silva da Silva. 2019. Towards an Extensible Architecture for Refactoring Test Code. In Proceedings of the International Conference on Computational Science and Its Applications. Springer, Cham, Switzerland. 456–471. https://doi.org/10.1007/978-3-030-24305-0_34
[21]
Tom Mens and Tom Tourwé. 2004. A survey of software refactoring. IEEE Transactions on software engineering, 30, 2 (2004), 126–139. https://doi.org/10.1109/TSE.2004.1265817
[22]
S. Messaoudi, A. Panichella, D. Bianculli, L. Briand, and R. Sasnauskas. 2018. A Search-Based Approach for Accurate Identification of Log Message Formats. In Proceedings of the 26th International Conference on Program Comprehension (ICPC). IEEE Press, Piscataway, NJ, USA. 167–177. https://doi.org/10.1145/3196321.3196340
[23]
Fabio Palomba, Andy Zaidman, and Andrea De Lucia. 2018. Automatic test smell detection using information retrieval techniques. In Proceedings of the International Conference on Software Maintenance and Evolution (ICSME). Association for Computing Machinery, New York, NY, USA. 311–322. https://doi.org/10.1109/ICSME.2018.00040
[24]
Annibale Panichella, Sebastiano Panichella, Gordon Fraser, Anand Ashok Sawant, and Vincent J Hellendoorn. 2020. Revisiting test smells in automatically generated tests: limitations, pitfalls, and opportunities. In Proceeding of the IEEE International Conference on Software Maintenance and Evolution (ICSME). IEEE, Los Alamitos, CA, USA. 523–533. https://doi.org/10.1109/ICSME46990.2020.00056
[25]
Anthony Peruma, Khalid Almalki, Christian D Newman, Mohamed Wiem Mkaouer, Ali Ouni, and Fabio Palomba. 2019. On the distribution of test smells in open source android applications: An exploratory study. In Proceedings of the 29th Annual International Conference on Computer Science and Software Engineering. IBM Corp., USA. 193–202.
[26]
[n.d.]. Microsoft python-program-analysis library. https://github.com/microsoft/python-program-analysis
[27]
Mojtaba Shahin, Muhammad Ali Babar, and Liming Zhu. 2017. Continuous integration, delivery and deployment: a systematic review on approaches, tools, challenges and practices. IEEE Access, 5 (2017), 3909–3943. https://doi.org/10.1109/ACCESS.2017.2685629
[28]
Davide Spadini, Fabio Palomba, Andy Zaidman, Magiel Bruntink, and Alberto Bacchelli. 2018. On the relation of test smells to software code quality. In Proceedings of the International Conference on Software Maintenance and Evolution. (ICSME). Association for Computing Machinery, New York, NY, USA. 1–12. https://doi.org/10.1109/ICSME.2018.00010
[29]
Bullseye Testing Technology. [n.d.]. BullseyeCoverage. https://www.bullseye.com
[30]
Arie Van Deursen, Leon Moonen, Alex Van Den Bergh, and Gerard Kok. 2001. Refactoring test code. In Proceedings of the 2nd international conference on extreme programming and flexible processes in software engineering (XP). ACM, New York, NY, USA. 92–95.
[31]
András Vargha and Harold D Delaney. 2000. A critique and improvement of the CL common language effect size statistics of McGraw and Wong. Journal of Educational and Behavioral Statistics, 25, 2 (2000), 101–132. https://doi.org/10.3102/10769986025002101
[32]
M. Weiser. 1984. Program Slicing. IEEE Transactions on Software Engineering, SE-10, 4 (1984), 352–357. https://doi.org/10.1109/TSE.1984.5010248
[33]
Jifeng Xuan and Martin Monperrus. 2014. Test Case Purification for Improving Fault Localization. In Proceedings of the 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering (FSE 2014). ACM, New York, NY, USA. 52–63. https://doi.org/10.1145/2635868.2635906
[34]
Shin Yoo, David W. Binkley, and Roger D. Eastman. 2017. Observational slicing based on visual semantics. J. Syst. Softw., 129 (2017), 60–78. https://doi.org/10.1016/j.jss.2016.04.009
[35]
S. Yoo and M. Harman. 2012. Regression testing minimization, selection and prioritization: a survey. Software Testing, Verification and Reliability, 22, 2 (2012), 67–120. https://doi.org/10.1002/stvr.430

Cited By

View all
  • (2024)Reducing the Length of Dynamic and Relevant Slices by Pruning Boolean ExpressionsElectronics10.3390/electronics1306114613:6(1146)Online publication date: 20-Mar-2024
  • (2024)AbstractTrace: The Use of Execution Traces to Cluster, Classify, Prioritize, and Optimize a Bloated Test SuiteApplied Sciences10.3390/app14231116814:23(11168)Online publication date: 29-Nov-2024
  • (2024)A Large-Scale Evaluation for Log Parsing Techniques: How Far Are We?Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3650212.3652123(223-234)Online publication date: 11-Sep-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ISSTA 2021: Proceedings of the 30th ACM SIGSOFT International Symposium on Software Testing and Analysis
July 2021
685 pages
ISBN:9781450384599
DOI:10.1145/3460319
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 11 July 2021

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. log
  2. program slicing
  3. system level testing

Qualifiers

  • Research-article

Funding Sources

Conference

ISSTA '21
Sponsor:

Acceptance Rates

Overall Acceptance Rate 58 of 213 submissions, 27%

Upcoming Conference

ISSTA '25

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)186
  • Downloads (Last 6 weeks)26
Reflects downloads up to 15 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Reducing the Length of Dynamic and Relevant Slices by Pruning Boolean ExpressionsElectronics10.3390/electronics1306114613:6(1146)Online publication date: 20-Mar-2024
  • (2024)AbstractTrace: The Use of Execution Traces to Cluster, Classify, Prioritize, and Optimize a Bloated Test SuiteApplied Sciences10.3390/app14231116814:23(11168)Online publication date: 29-Nov-2024
  • (2024)A Large-Scale Evaluation for Log Parsing Techniques: How Far Are We?Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis10.1145/3650212.3652123(223-234)Online publication date: 11-Sep-2024
  • (2024)Deep Learning or Classical Machine Learning? An Empirical Study on Log-Based Anomaly DetectionProceedings of the IEEE/ACM 46th International Conference on Software Engineering10.1145/3597503.3623308(1-13)Online publication date: 20-May-2024
  • (2024)Mitigating the Uncertainty and Imprecision of Log-Based Code Coverage Without Requiring Additional Logging StatementsIEEE Transactions on Software Engineering10.1109/TSE.2024.343506750:9(2350-2362)Online publication date: Sep-2024
  • (2024)Shaken, Not Stirred: How Developers Like Their Amplified TestsIEEE Transactions on Software Engineering10.1109/TSE.2024.338101550:5(1264-1280)Online publication date: May-2024
  • (2023)A Literature Survey of Assertions in Software TestingEngineering of Computer-Based Systems10.1007/978-3-031-49252-5_8(75-96)Online publication date: 16-Oct-2023
  • (2023)Towards Log SlicingFundamental Approaches to Software Engineering10.1007/978-3-031-30826-0_14(249-259)Online publication date: 22-Apr-2023
  • (2022)Production Monitoring to Improve Test SuitesIEEE Transactions on Reliability10.1109/TR.2021.310131871:3(1381-1397)Online publication date: Sep-2022
  • (2022)Test Transplantation through Dynamic Test Slicing2022 IEEE 22nd International Working Conference on Source Code Analysis and Manipulation (SCAM)10.1109/SCAM55253.2022.00009(35-39)Online publication date: Oct-2022
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media