JUnit 4

tapir does not enforce the usage of JUnit 4. tapir tests can be started using a Java main method as stated in Running your tapir Tests or JUnit 5. Anyway, using JUnit 4 enables a lot of additional amenities. JUnit 4 is widespread and integrates into existing ecosystems quite well. There are many tools which are aware of the JUnit 4 API.




You can start your tapir tests directly from Eclipse by right-clicking the test class and selecting Run As | JUnit Test.

The progress and the results are displayed in the JUnit view.

You can select any method/step and execute it with Run As \| JUnit Test. The selected and all upcoming steps are executed.


As tapir fulfills the JUnit4 API, it integrates transparently with the maven-surefire-plugin/maven-failsafe-plugin.

You can execute the tests by running this command:

> mvn clean test


Jenkins provides a JUnit plugin which is 100% compatible with tapir. The JUnit plugin consumes XML test reports (which are generated by tapir’s JUnit module) and provides some graphical visualization of the historical test results as well as a web UI for viewing test reports, tracking failures, and so on. 

There are a couple of additional plugins which are based on the JUnit 4 API, like Test In Progress which visualizes the current test execution progress.

In general all the frameworks and tools which are compatible to JUnit 4 are compatible to tapir as well.