ReAssert: Suggesting repairs for broken unit tests

Brett Daniel, Vilas Jagannath, Danny Dig, Darko Marinov

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

Developers 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 tests or remove them from the test suite. Reparing tests is time consuming but beneficial, since removing tests reduces a test suite's ability to detect regressions. Fortunately, simple program transformations can repair many failing tests automatically. We present ReAssert, a novel technique and tool that suggests repairs to failing tests' code which cause the tests to pass. Examples include replacing literal values in tests, changing assertion methods, or replacing one assertion with several. If the developer chooses to apply the repairs, ReAssert modifies the code automatically. Our experiments show that ReAssert can repair many common test failures and that its suggested repairs correspond to developers' expectations.

Original languageEnglish (US)
Title of host publicationASE2009 - 24th IEEE/ACM International Conference on Automated Software Engineering
Pages433-444
Number of pages12
DOIs
StatePublished - 2009
Event24th IEEE/ACM International Conference on Automated Software Engineering, ASE2009 - Auckland, New Zealand
Duration: Nov 16 2009Nov 20 2009

Publication series

NameASE2009 - 24th IEEE/ACM International Conference on Automated Software Engineering

Other

Other24th IEEE/ACM International Conference on Automated Software Engineering, ASE2009
CountryNew Zealand
CityAuckland
Period11/16/0911/20/09

ASJC Scopus subject areas

  • Computer Science Applications
  • Software

Fingerprint Dive into the research topics of 'ReAssert: Suggesting repairs for broken unit tests'. Together they form a unique fingerprint.

Cite this