Scripts for converting a code base from one JUnit version to another
APACHE-2.0 License
Conversion scripts and tools to assist with the migration from one version of JUnit to a newer JUnit version.
The junit3ToJUnit4.zsh
script in this repository is not perfect,
but it goes a long way towards dealing with the most common problems.
Does not address calls to:
junit.framework.TestSuite.addTestSuite(clazz);
For these you need to use @RunWith(Suite.class)
.
The junit4ToJUnitJupiter.zsh
script in this repository helps
with automatically modifying imports and annotation usage but
does not assist with migrating assertions, rules, parameterized
tests, or use of @FixMethodOrder
. The script also does not
migrate the exception
and timeout
attributes of JUnit 4's
@Test
annotation.
See also: https://github.com/junit-pioneer/convert-junit4-to-junit5