Test case analytics: Mining test case traces to improve risk-driven testing

In risk-driven testing, test cases are generated and/or prioritized based on different risk measures. For example, the most basic risk measure would analyze the history of the software and assigns higher risk to the test cases that used to detect bugs in the past. However, in practice, a test case may not be exactly the same as a previously failed test, but quite similar. In this study, we define a new risk measure that assigns a risk factor to a test case, if it is similar to a failing test case from history. The similarity is defined based on the execution traces of the test cases, where we define each test case as a sequence of method calls. We have evaluated our new risk measure by comparing it to a traditional risk measure (where the risk measure would be increased only if the very same test case, not a similar one, failed in the past). The results of our study, in the context of test case prioritization, on two open source projects show that our new risk measure is by far more effective in identifying failing test cases compared to the traditional risk measure.

[1]  Robert Eschbach,et al.  Risk-Based Testing of Safety-Critical Embedded Systems Driven by Fault Tree Analysis , 2011, 2011 IEEE Fourth International Conference on Software Testing, Verification and Validation Workshops.

[2]  Stephen McCamant,et al.  The Daikon system for dynamic detection of likely invariants , 2007, Sci. Comput. Program..

[3]  A. Porter,et al.  A history-based test prioritization technique for regression testing in resource constrained environments , 2002, Proceedings of the 24th International Conference on Software Engineering. ICSE 2002.

[4]  Ahmed E. Hassan,et al.  Prioritizing the creation of unit tests in legacy software systems , 2011, Softw. Pract. Exp..

[5]  Byoungju Choi,et al.  A Test Case Prioritization Based on Degree of Risk Exposure and its Empirical Study , 2011, Int. J. Softw. Eng. Knowl. Eng..

[6]  Adam A. Porter,et al.  A history-based test prioritization technique for regression testing in resource constrained environments , 2002, ICSE '02.

[7]  A. Zeller,et al.  Predicting Defects for Eclipse , 2007, Third International Workshop on Predictor Models in Software Engineering (PROMISE'07: ICSE Workshops 2007).

[8]  Michael D. Ernst,et al.  Defects4J: a database of existing faults to enable controlled testing studies for Java programs , 2014, ISSTA 2014.

[9]  Marc-Florian Wendland,et al.  Risk-Based Testing - (Track Introduction) , 2014, ISoLA.

[10]  Norman E. Fenton,et al.  A Critique of Software Defect Prediction Models , 1999, IEEE Trans. Software Eng..