JUnit 5 extension for Cucumber

The latest versions of the Cucumber artifacts for Java incorporates a JUnit 5 extension for Cucumber. This section contains a complete example of a feature defined in Gherkin and the JUnit 5 to execute it with Cucumber. As usual, the source code of this example is hosted on GitHub (https://github.com/bonigarcia/mastering-junit5).

The structure of the project containing this example is as follows:

JUnit 5 with Cucumber project structure and content

First of all, we need to create our Gherkin file, which is aimed to test a simple calculator system. This calculator will be the SUT or our test. The content of our ...

Get Mastering Software Testing with JUnit 5 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.