0
how to add maven dependency for cucumber-jvm

Solved 1 Answers 147 Views Test Automation
0 1

I need lines of code to add maven dependency for cucumber-jvm into pom.xml file.



 

1 Answer

0
Best answer
0

If you are going to use the lambda expressions API to write the Step Definitions, you need:

<dependency>
    <groupId>info.cukes</groupId>
    <artifactId>cucumber-java8</artifactId>
    <version>1.2.3</version>
    <scope>test</scope>
</dependency>

Otherwise, to write them using annotated methods, you need:

<dependency>
    <groupId>info.cukes</groupId>
    <artifactId>cucumber-java</artifactId>
    <version>1.2.3</version>
    <scope>test</scope>
</dependency>

 

Also you may have to add other dependencies.

cucumber-core:

<dependency>
    <groupId>info.cukes</groupId>
    <artifactId>cucumber-core</artifactId>
    <version>1.2.3</version>
</dependency>

cucumber-junit:

<dependency>
    <groupId>info.cukes</groupId>
    <artifactId>cucumber-junit</artifactId>
    <version>1.2.3</version>
</dependency>

cucumber-jvm-deps

<dependency>
    <groupId>info.cukes</groupId>
    <artifactId>cucumber-jvm-deps</artifactId>
    <version>1.0.5</version>
</dependency>

gherkin

<dependency>
    <groupId>info.cukes</groupId>
    <artifactId>gherkin</artifactId>
    <version>2.12.2</version>
</dependency>

gherkin-jvm-deps

<dependency>
    <groupId>info.cukes</groupId>
    <artifactId>gherkin-jvm-deps</artifactId>
    <version>1.0.3</version>
</dependency>


cucumber-html

<dependency>
    <groupId>info.cukes</groupId>
    <artifactId>cucumber-html</artifactId>
    <version>0.2.3</version>
</dependency>
 

you can keep default junit library into maven.

 

answered by
selected by

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.
...