O'Reilly logo

Java 11 Cookbook by Mohamed Sanaulla, Nick Samoylov

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

How to do it...

  1. Install Cucumber. The Cucumber installation is nothing more than adding the framework to the project as a Maven dependency. Since we are going to add several Cucumber JAR files and all of them have to be of the same version, it makes sense to add the cucumber.version property in pom.xml first:
    <properties>        <cucumber.version>3.0.2</cucumber.version>    </properties>

Now we can add the Cucumber main JAR file in pom.xml as a dependency:

<dependency>    <groupId>io.cucumber</groupId>    <artifactId>cucumber-java</artifactId>    <version>${cucumber.version}</version>    <scope>test</scope></dependency>

Alternatively, if you prefer a fluent stream-based style of coding, you can add a different Cucumber main JAR file:

<dependency> <groupId> ...

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