An Experimental Study on Flakiness and Fragility of Randoop Regression Test Suites

Randoop is a well-known tool that proposes a feedback-directed algorithm for automatic and random generation of unit tests for a given Java class. It automatically generates two test suites for the class under test: (1) an error-revealing test suite, and (2) a regression test suite. Despite successful experiences with applying Randoop on real world projects like Java Development Kit (JDK) which have led to creation of error-revealing tests and identification of real bugs, it has not been investigated in the literature how useful are the regression test suites generated by Randoop. In this paper, we have investigated flakiness and fragility of Randoop’s regression tests during evolution of 5 open source Java projects with a total of 78 versions. The results demonstrate that the flakiness of the regression tests is not generally noticeable, since in our dataset, only 5% of the classes have at least one flaky regression tests. In addition, test fragility analysis reveals that in most versions of the projects under study, the regression tests generated by Randoop could be successfully executed on many of later versions. Actually, for 2 out of 5 projects in the experiments, the regression tests generated for each version could be successfully executed on all the later versions of the project.

[1]  Gilles Pesant,et al.  JTExpert at the Fourth Unit Testing Tool Competition , 2016, 2016 IEEE/ACM 9th International Workshop on Search-Based Software Testing (SBST).

[2]  Michael Pradel,et al.  Saying ‘Hi!’ is not enough: Mining inputs for effective test generation , 2017, 2017 32nd IEEE/ACM International Conference on Automated Software Engineering (ASE).

[3]  Darko Marinov,et al.  ReAssert: Suggesting Repairs for Broken Unit Tests , 2009, 2009 IEEE/ACM International Conference on Automated Software Engineering.

[4]  Rudolf Ramler,et al.  Applying Automated Test Case Generation in Industry: A Retrospective , 2018, 2018 IEEE International Conference on Software Testing, Verification and Validation Workshops (ICSTW).

[5]  Lei Ma,et al.  Retrofitting automatic testing through library tests reusing , 2016, 2016 IEEE 24th International Conference on Program Comprehension (ICPC).

[6]  Hiroyuki Sato,et al.  An empirical study on the effects of code visibility on program testability , 2016, Software Quality Journal.

[7]  Gordon Fraser,et al.  EvoSuite: automatic test suite generation for object-oriented software , 2011, ESEC/FSE '11.

[8]  Peter W. O'Hearn,et al.  From Start-ups to Scale-ups: Opportunities and Open Problems for Static and Dynamic Program Analysis , 2018, 2018 IEEE 18th International Working Conference on Source Code Analysis and Manipulation (SCAM).

[9]  Nikolai Tillmann,et al.  MSeqGen: object-oriented unit-test generation via mining source code , 2009, ESEC/SIGSOFT FSE.

[10]  Urko Rueda,et al.  Java Unit Testing Tool Competition - Seventh Round , 2019, 2019 IEEE/ACM 12th International Workshop on Search-Based Software Testing (SBST).

[11]  Hiroyuki Sato,et al.  GRT: Program-Analysis-Guided Random Testing (T) , 2015, 2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE).

[12]  Michael D. Ernst,et al.  Randoop: feedback-directed random testing for Java , 2007, OOPSLA '07.

[13]  Gordon Fraser,et al.  Do Automatically Generated Unit Tests Find Real Faults? An Empirical Study of Effectiveness and Challenges (T) , 2015, 2015 30th IEEE/ACM International Conference on Automated Software Engineering (ASE).

[14]  Darko Marinov,et al.  An empirical analysis of flaky tests , 2014, SIGSOFT FSE.

[15]  Carl K. Chang,et al.  OCAT: object capture-based automated testing , 2010, ISSTA '10.

[16]  Zoltán Micskei,et al.  Evaluating code‐based test input generator tools , 2017, Softw. Test. Verification Reliab..

[17]  Marco Torchiano,et al.  Mobile GUI Testing Fragility: A Study on Open-Source Android Applications , 2019, IEEE Transactions on Reliability.

[18]  I. S. W. B. Prasetya T3i: a tool for generating and querying test suites for Java , 2015, ESEC/SIGSOFT FSE.

[19]  Zhendong Su,et al.  Synthesizing method sequences for high-coverage testing , 2011, OOPSLA '11.

[20]  Gordon Fraser,et al.  Private API Access and Functional Mocking in Automated Unit Test Generation , 2017, 2017 IEEE International Conference on Software Testing, Verification and Validation (ICST).