JUnit is a simple framework used to write repeatable tests. It is an instance of the xUnit architecture for unit testing frameworks. Features and fixes for the new version include:
- JUnitCore now more often exits with the correct exit code (0 for success, 1 for failure)
- Badly formed test classes produce more helpful error messages
- Test classes whose only test methods are inherited from superclasses now run.
- Optimization to annotation processing can cut JUnit overhead by more than half on large test classes, especially when using Theories.
- A failing assumption in a constructor ignores the class.
- Correct results when comparing the string "null" with potentially null values.
- Annotating a class with @RunWith will always invoke the default JUnit 4 runner in the current version of JUnit.