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:
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 ...