0

I have seen it, and i have tried to follow its steps to generate the steps of feature file. Here is my dependencies in pom.xml:

<dependencies>

        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>3.4.0</version>
        </dependency>

        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-junit</artifactId>
            <version>1.2.5</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>

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

And i have defined the runner class as below:

import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
import org.junit.runner.RunWith;

@RunWith(Cucumber.class)
@CucumberOptions(plugin = {"pretty", "html:target/cucumber"})
public class RunCukesTest {
}

and the feature file is located in src/features in the project:

The problem is, when i right click on the feature file-> Run as-> Cucumber

Nothing happens.

I expect that, the cucumber runner runs, and gives me the steps

So, what is wrong?

Feature is:

Feature: Title of your feature I want to submit data into registeration form

Scenario: Register into the forum
Given I want to register into the main forum
When I enter name
    And I enter passwrod
    And I repeat the password
    And I enter username
    And I enter email
Then I click the submit
Sal-laS
  • 11,016
  • 25
  • 99
  • 169

1 Answers1

1

I didn't need that RunCukesTest at all.The point was to install the Cucumber-jvm plugin on STS, and it generates the steps very easily. This question was also very useful.

Additionally, to run a feature file in Eclipse, you should

  1. open the file
  2. Right click on it
  3. Rus as
  4. 1 Cucumber Feature
Sal-laS
  • 11,016
  • 25
  • 99
  • 169