How often have you changed your software only to find that the change broke many unit tests? Sometimes your change introduced a bug, but other times your tests are broken and you must update them to reflect the behavior of the changed software. Repairing broken tests can be time-consuming and difficult.
ReAssert can repair broken tests with the push of a button. More precisely, it suggests changes to test code that are sufficient to make the tests pass. Examples include replacing literal values, changing assertion methods, or replacing one assertion with several. If you choose to apply the changes, ReAssert modifies the test automatically.
(New!) Reassert demo video
ReAssert is available as an Eclipse plugin or a standalone Java library and command-line tool. Both can repair unit tests written using JUnit version 3.* or 4.*. The plugin requires Java 1.6 and Eclipse 3.4 or greater.
To install the plugin, navigate to
Help > Install New
Software and add the following update site:
The plugin will add a "Repair With ReAssert" option to a failing test's (or test container's) right-click context menu. Clicking it will display a compare dialog showing the proposed repairs.
The standalone ReAssert library can repair tests from the
command line. Extract the .zip file into the directory of your
choice, then run
reassert.sh in Bash or Cygwin for usage