Exception in stream "main" cucumber.runtime.CucumberException: no links were found

I am developing my Selenium-JVM framework using Cucumber and when I launch my first function I got the error below.

Please, help.

How I launched this function -

  • Right click on properties file
  • Choose Run As → Cucumber Function

Immediate exception -

Exception in thread "main" cucumber.runtime.CucumberException: No backends were found. Please make sure you have a backend module on your CLASSPATH. at cucumber.runtime.Runtime.<init>(Runtime.java:78) at cucumber.runtime.Runtime.<init>(Runtime.java:67) at cucumber.runtime.Runtime.<init>(Runtime.java:63) at cucumber.api.cli.Main.run(Main.java:24) at cucumber.api.cli.Main.main(Main.java:16) 

What's in my code -

Launcher.java -

 package cucumber; import org.junit.runner.RunWith; import cucumber.api.CucumberOptions; import cucumber.api.junit.Cucumber; @RunWith(Cucumber.class) @CucumberOptions(format={"pretty","json:target/"} , features="/src/test/java/cucumber/features") public class Launcher { } 

Functional File -

 Feature: it works demo Scenario: First test Given this is my step When this is my second step Then this is my final step 

List of dependencies added to the list -

 cucumber-core-1.1.8 cucumber-html-0.2.3 cucumber-java-1.1.8 cucumber-junit-1.1.8 cucumber-jvm-deps-1.0.3 gherkin-2.12.2 hamcrest-all-1.3 junit-4.11 selenium-api-2.42.2 selenium-firefox-driver-2.42.2 selenium-java-2.42.2 selenium-remote-driver-2.42.2 selenium-support-2.42.2 

My JVM - 1.7

Only this is available in the project.

Please, help.

+9
java selenium-webdriver cucumber-jvm
source share
6 answers

Make sure you add the below dependencies for your Maven project:

You can replace the version with the latest or desired version:

  <dependency> <groupId>info.cukes</groupId> <artifactId>cucumber-java</artifactId> <version>1.2.0</version> <scope>test</scope> </dependency> <dependency> <groupId>info.cukes</groupId> <artifactId>cucumber-junit</artifactId> <version>1.2.0</version> </dependency> 
+8
source share

This error occurs if "backends" is not found in the classpath. There is a "backend" for each supported language (for example, cucumber-java, cucumber-groovy, etc.).

This is probably a class error, although if the cucumber core and cucumber-java are in the same place, which seems strange.

+11
source share

You can try cucumber-java-1.2.4 at https://mvnrepository.com/artifact/info.cukes/cucumber-java/1.2.4 .

I found that trying to use a previous version of the same JAR file worked for me. I think it can solve for other people. If not, add one more answer.

Let me know if this worked for you and saved some valuable time :-)

0
source share

Here is the fix: in eclipse projects add the following to your .project file

 <buildSpec> ... <buildCommand> <name>cucumber.eclipse.steps.jdt.stepsBuilder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> ... <nature>cucumber.eclipse.steps.jdt.stepsNature</nature> </natures> 

If this does not solve the problem, add a dependency

Java Cucumber

in the path to the project class or change the jar version to the latest or n-1

0
source share

By adding the following dependency, I solved this problem

  <dependency> <groupId>io.cucumber</groupId> <artifactId>cucumber-java</artifactId> <version>4.2.6</version> </dependency> 
0
source share

I came across the same error message when trying to run the Cucumber function file in Eclipse ("There are no backend references. Make sure you have the server module on your CLASSPATH").

That it made me go into my pom.xml and change the version of cucumber-java and cucumber-unit from 1.2.5 ( for their documentation ) to 1.2.0.

I am not 100% sure if I ignore the real problem, doing it or not. Here is more detailed information about my setup:

  • Windows 10
  • Eclipse Neon (4.6.0)
  • Apache Maven 3.5.0
  • Java 1.8

I checked with quick commands that java and maven were successfully installed and running on my machine. I also confirmed that Maven pulled java cucumber and cucumber boxes in my Eclipse project. Odd

-one
source share

All Articles