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.
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.x or 4.x. The plugin has been tested in Eclipse 3.4 with Java 1.6.
plugins directory. The plugin will
add a "Fix All Failing Tests" button
to Eclipse's JUnit runner and
"Fix Failing Test" option to a failing test's (or test container's)
right-click context menu. Clicking either will
display a compare dialog
showing the proposed repairs.
reassert.sh in Bash
or Cygwin for usage information.