Running tests in JUnit 5

At the time of writing, Jupiter tests can be executed in several ways:

  • Using a build tool: Maven (implemented in the module junit-plaform-surefire-provider) or Gradle (implemented in the module junit-platform-gradle-plugin).
  • Using the Console Launcher: A command-line Java application that allows to launch the JUnit Platform from the console.
  • Using an IDE: IntelliJ (since version 2016.2) and Eclipse (since version 4.7, Oxygen).

As we are going to discover, and due to the modular architecture of JUnit 5, we need to include three dependencies in our projects: one for the Test API (to implement tests), an other for the Test Engine (to run tests), and the last one of the Test Launcher (to discover tests).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.187.233