O'Reilly logo

Mastering Software Testing with JUnit 5 by Boni García

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Test Engine SPI

The Test Engine SPI allows for creating test executors on top of the JVM. In the JUnit 5 framework, there are two Test Engine implementations out of the box:

  • The junit-vintage-engine: This allows running JUnit 3 and 4 tests in the JUnit platform.
  • The junit-jupiter-engine: This allows running JUnit 5 tests in the JUnit platform.

Moreover, third-party test libraries (for example, Spock, TestNG, and so on) can plug into the JUnit Platform by providing a custom Test Engine. To do that, these frameworks should create its own Test Engine by extending the JUnit 5 interface org.junit.platform.engine.TestEngine. In order to extend this interface, three mandatory methods must be overridden:

  • getId: The unique identifier for the test ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required