skip to main content
10.1145/1985793.1985978acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article

ReAssert: a tool for repairing broken unit tests

Authors Info & Claims
Published:21 May 2011Publication History

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.

References

  1. Hamcrest - Library of matchers for test expressions. http:/http://code.google.com/p/hamcrest/.Google ScholarGoogle Scholar
  2. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  3. B. Daniel, T. Gvero, and D. Marinov. On test repair using symbolic execution. In ISSTA, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  5. Improving Works. Infinitest. http://improvingworks.com/products/infinitest/.Google ScholarGoogle Scholar
  6. M. Mirzaaghaei, F. Pastore, and M. Pezze. Automatically repairing test cases for evolving method declarations. In ICSM, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. D. Saff and M. D. Ernst. An experimental evaluation of continuous testing during development. In ISSTA, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  9. N. Tillmann and W. Schulte. Unit tests reloaded: Parameterized unit testing with symbolic execution. Tech report, Microsoft Research, 2005.Google ScholarGoogle Scholar
  10. 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 ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. ReAssert: a tool for repairing broken unit tests

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • Published in

      cover image ACM Conferences
      ICSE '11: Proceedings of the 33rd International Conference on Software Engineering
      May 2011
      1258 pages
      ISBN:9781450304450
      DOI:10.1145/1985793

      Copyright © 2011 Copyright is held by the owner/author(s)

      Permission to make digital or hard copies of part or all 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 third-party components of this work must be honored. For all other uses, contact the Owner/Author.

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 21 May 2011

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      Overall Acceptance Rate276of1,856submissions,15%

      Upcoming Conference

      ICSE 2025

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader