Abstract
Search-based techniques have been widely used for white-box test generation. Many of these approaches rely on the approach level and branch distance heuristics to guide the search process and generate test cases with high line and branch coverage. Despite the positive results achieved by these two heuristics, they only use the information related to the coverage of explicit branches (e.g., indicated by conditional and loop statements), but ignore potential implicit branchings within basic blocks of code. If such implicit branching happens at runtime (e.g., if an exception is thrown in a branchless-method), the existing fitness functions cannot guide the search process. To address this issue, we introduce a new secondary objective, called Basic Block Coverage (BBC), which takes into account the coverage level of relevant basic blocks in the control flow graph. We evaluated the impact of BBC on search-based crash reproduction because the implicit branches commonly occur when trying to reproduce a crash, and the search process needs to cover only a few basic blocks (i.e., blocks that are executed before crash happening). We combined BBC with existing fitness functions (namely STDistance and WeightedSum) and ran our evaluation on 124 hard-to-reproduce crashes. Our results show that BBC, in combination with STDistance and WeightedSum, reproduces 6 and 1 new crashes, respectively. BBC significantly decreases the time required to reproduce 26.6% and 13.7% of the crashes using STDistance and WeightedSum, respectively. For these crashes, BBC reduces the consumed time by 44.3% (for STDistance) and 40.6% (for WeightedSum) on average.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Notes
References
Allen, F.E.: Control flow analysis, vol. 5, pp. 1–19. ACM, New York (1970). https://doi.org/10.1145/390013.808479
Arcuri, A.: RESTful API automated test case generation with Evomaster. ACM Trans. Softw. Eng. Methodol. (TOSEM) 28(1), 1–37 (2019)
Arcuri, A., Briand, L.: A Hitchhiker’s guide to statistical tests for assessing randomized algorithms in software engineering. Softw. Test. Verif. Reliab. 24(3), 219–250 (2014). https://doi.org/10.1002/stvr.1486
Borba, P., Cavalcanti, A., Sampaio, A., Woodcook, J. (eds.): PSSE 2007. LNCS, vol. 6153. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-14335-9
Chen, N., Kim, S.: STAR: stack trace based automatic crash reproduction via symbolic execution. IEEE Trans. Softw. Eng. 41(2), 198–220 (2015)
Derakhshanfar, P., Devroey, X.: Replication package of basic block coverage for search-based crash reproduction. https://doi.org/10.5281/zenodo.3953519
Derakhshanfar, P., Devroey, X., Panichella, A., Zaidman, A., van Deursen, A.: Towards integration-level test case generation using call site information. arXiv preprint arXiv:2001.04221 (2020)
Derakhshanfar, P., Devroey, X., Perrouin, G., Zaidman, A., van Deursen, A.: Search-based crash reproduction using behavioural model seeding. Softw. Test. Verif. Reliab. (2020). https://doi.org/10.1002/stvr.1733
Fraser, G., Arcuri, A.: Evosuite: automatic test suite generation for object-oriented software. In: Proceedings of the 19th ACM SIGSOFT Symposium and the 13th European Conference on Foundations of software Engineering, pp. 416–419 (2011)
Fraser, G., Arcuri, A.: Whole test suite generation. IEEE Trans. Softw. Eng. 39(2), 276–291 (2012)
Fraser, G., Arcuri, A.: 1600 faults in 100 projects: automatically finding faults while achieving high coverage with Evosuite. Empirical Software Eng. 20(3), 611–639 (2015)
McMinn, P.: Search-based software test data generation: a survey. Software Test. Verif. Reliab. 14(2), 105–156 (2004)
Nayrolles, M., Hamou-Lhadj, A., Tahar, S., Larsson, A.: Jcharming: a bug reproduction approach using crash traces and directed model checking. In: International Conference on Software Analysis, Evolution, and Reengineering (SANER), pp. 101–110. IEEE (2015)
Panichella, A., Kifetew, F.M., Tonella, P.: Automated test case generation as a many-objective optimisation problem with dynamic selection of the targets. IEEE Trans. Software Eng. 44(2), 122–158 (2018)
Rojas, J.M., Campos, J., Vivanti, M., Fraser, G., Arcuri, A.: Combining multiple coverage criteria in search-based unit test generation. In: Barros, M., Labiche, Y. (eds.) SSBSE 2015. LNCS, vol. 9275, pp. 93–108. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-22183-0_7
Rößler, J., Zeller, A., Fraser, G., Zamfir, C., Candea, G.: Reconstructing core dumps. In: Proceedings of the International Conference on Software Testing, Verification and Validation (ICST), pp. 114–123. IEEE (2013)
Soltani, M., Derakhshanfar, P., Devroey, X., van Deursen, A.: A benchmark-based evaluation of search-based crash reproduction. Empirical Software Eng. 25(1), 96–138 (2020). https://doi.org/10.1007/s10664-019-09762-1
Soltani, M., Derakhshanfar, P., Panichella, A., Devroey, X., Zaidman, A., van Deursen, A.: Single-objective versus multi-objectivized optimization for evolutionary crash reproduction. In: Colanzi, T.E., McMinn, P. (eds.) SSBSE 2018. LNCS, vol. 11036, pp. 325–340. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-99241-9_18
Soltani, M., Panichella, A., Van Deursen, A.: Search-based crash reproduction and its impact on debugging. IEEE Trans. Software Eng. 1 (2018)
Vargha, A., Delaney, H.D.: A critique and improvement of the CL common language effect size statistics of McGraw and Wong. J. Educ. Behav. Stat. 25(2), 101–132 (2000)
Xuan, J., Xie, X., Monperrus, M.: Crash reproduction via test case mutation: let existing test cases help. In: Proceedings of the Joint Meeting on Foundations of Software Engineering (ESEC/FSE), pp. 910–913. ACM (2015)
Zeller, A.: Why programs fail, second edition: a guide to systematic debugging, 2nd edn. Morgan Kaufmann Publishers Inc., San Francisco (2009)
Acknowledgements
The authors would like to thank Carolin Brandt for her valuable feedback on the paper. This research was partially funded by the EU Horizon 2020 ICT-10-2016-RIA “STAMP” project (No. 731529).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
1 Electronic supplementary material
Below is the link to the electronic supplementary material.
Rights and permissions
Copyright information
© 2020 Springer Nature Switzerland AG
About this paper
Cite this paper
Derakhshanfar, P., Devroey, X., Zaidman, A. (2020). It Is Not Only About Control Dependent Nodes: Basic Block Coverage for Search-Based Crash Reproduction. In: Aleti, A., Panichella, A. (eds) Search-Based Software Engineering. SSBSE 2020. Lecture Notes in Computer Science(), vol 12420. Springer, Cham. https://doi.org/10.1007/978-3-030-59762-7_4
Download citation
DOI: https://doi.org/10.1007/978-3-030-59762-7_4
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-59761-0
Online ISBN: 978-3-030-59762-7
eBook Packages: Computer ScienceComputer Science (R0)