ABSTRACT
Successful software systems continuously change their requirements and thus code. When this happens, some existing tests get broken because they no longer reflect the intended behavior, and thus they need to be updated. Repairing broken tests can be time-consuming and difficult.
We present ReAssert, a tool that can automatically suggest repairs for broken unit tests. Examples include replacing literal values in tests, changing assertion methods, or replacing one assertion with several. Our experiments show that ReAssert can repair many common test failures and that its suggested repairs match developers' expectations.
- Hamcrest - Library of matchers for test expressions. http:/http://code.google.com/p/hamcrest/.Google Scholar
- M. Boshernitsan, R. Doong, and A. Savoia. From Daikon to Agitator: Lessons and challenges in building a commercial tool for developer testing. In ISSTA, 2006. Google ScholarDigital Library
- B. Daniel, T. Gvero, and D. Marinov. On test repair using symbolic execution. In ISSTA, 2010. Google ScholarDigital Library
- B. Daniel, V. Jagannath, D. Dig, and D. Marinov. ReAssert: Suggesting repairs for broken unit tests. In ASE, 2009. http://mir.cs.illinois.edu/reassert/. Google ScholarDigital Library
- Improving Works. Infinitest. http://improvingworks.com/products/infinitest/.Google Scholar
- M. Mirzaaghaei, F. Pastore, and M. Pezze. Automatically repairing test cases for evolving method declarations. In ICSM, 2010. Google ScholarDigital Library
- D. Saff and M. D. Ernst. An experimental evaluation of continuous testing during development. In ISSTA, 2004. Google ScholarDigital Library
- N. Tillmann and J. de Halleux. Pex - white box test generation for .NET. In Tests and Proofs. 2008. http://research.microsoft.com/projects/Pex/. Google ScholarDigital Library
- N. Tillmann and W. Schulte. Unit tests reloaded: Parameterized unit testing with symbolic execution. Tech report, Microsoft Research, 2005.Google Scholar
- A. Zaidman, B. V. Rompaey, S. Demeyer, and A. van Deursen. Mining software repositories to study co-evolution of production & test code. In ICST, 2008. Google ScholarDigital Library
Index Terms
- ReAssert: a tool for repairing broken unit tests
Recommendations
ReAssert: Suggesting Repairs for Broken Unit Tests
ASE '09: Proceedings of the 24th IEEE/ACM International Conference on Automated Software EngineeringDevelopers often change software in ways that cause tests to fail. When this occurs, developers must determine whether failures are caused by errors in the code under test or in the test code itself. In the latter case, developers must repair failing ...
On test repair using symbolic execution
ISSTA '10: Proceedings of the 19th international symposium on Software testing and analysisWhen developers change a program, regression tests can fail not only due to faults in the program but also due to out-of-date test code that does not reflect the desired behavior of the program. When this occurs, it is necessary to repair test code such ...
Guest Editors' Introduction: Software Testing Practices in Industry
Four papers and a roundtable discussion shed light on the current state of software testing practices. Case studies from industry experience address topics including unit-testing practices, agile testing, and automating software testing. Although many ...
Comments