Here’s a list of all the features that you can expect from JUnit Pioneer. For some of them you need to be quite familiar with JUnit 5, so make sure to read its user guide or this article series.
- Cartesian product of all test parameters
- Extends JUnit Jupiter with `@CartesianTest`, a variant of parameterized tests that tests all combinations of its input
- Default Locale and TimeZone
- Extends JUnit Jupiter with `@DefaultLocale`, `@DefaultTimeZone`, which change the values returned from Locale.getDefault() and TimeZone.getDefault()
- Disable Parameterized Test Based on DisplayName
- Extends JUnit Jupiter with `@DisableIfDisplayName`, which selectively disables parameterized tests
- Disable Tests if Others Fail
- Disables all tests in a container once the first test failed
- Disable Parameterized Test
- Extends JUnit Jupiter with multiple extensions, which selectively disables parameterized tests
- Temporarily Disable a Test
- Extends JUnit Jupiter with `@DisabledUntil` to temporarily disable a test.
- Clearing or Setting Environment Variables
- Extends JUnit Jupiter with `@ClearEnvironmentVariable`, `@SetEnvironmentVariable`, which clear and set the values of environment variables
- Issue Information
- Extends JUnit Jupiter with `@Issue` to publish issue information.
- JSON Argument Source
- Extends JUnit Jupiter with `@JsonFileSource`, a parametrized test that creates test based on a JSON Source
- Range Sources
- Extends JUnit Jupiter with `@IntRangeSource`, `@FloatRangeSource`, etc., which provide series of numbers as argument sources for parameterized tests.
- Publishing Report Entries
- Extends JUnit Jupiter with `@ReportEntry`, which publishes report entries using `TestReporter`.
- Retrying Failing Tests
- Extends JUnit Jupiter with `@RetryingTest`, which retries a failing test a certain number of times; only marking it failed if none of them pass
- Standard Input and Output
- Extends JUnit Jupiter with `@StdIo`, which simulates standard input or catches standard output.
- Measuring time with a Stopwatch
- Extends JUnit Jupiter with `@Stopwatch` to measure elapsed time of a test method
- Clearing or Setting System Properties
- Extends JUnit Jupiter with `@ClearSystemProperty`, `@SetSystemProperty`, which clear and set the values of system properties
- Temporary Files and Directories (removed in 1.0)
- Extends JUnit Jupiter with `@TempDir`, which create and clean up a temporary directory.
- Vintage @Test
- Extends JUnit Jupiter with a drop-in replacement for JUnit 4's @Test annotation, including expected and timeout
To start using JUnit Pioneer, determine the latest version (e.g. on Maven Central) and add org.junit-pioneer : junit-pioneer
as a test dependency.