0

I have created dummy project to figure out how Cucumber for android works and followed the "tutorial" here

https://www.jetbrains.com/idea/help/enabling-cucumber-support-in-project.html

I am using IntelliJ IDEA IDE as you can see and my feature looks like this:

Feature: Testing
Scenario: Testiranje
Given I am on the 'New Pet' page
And I press "Registrer"
Then I should go to the "Registrer" page
Given I am on the new pet page

And Java file:

public class ProradiStepDefs
{
    @Given("^I am on the 'New Pet' page$")
    public void I_am_on_the_New_Pet_page() throws Throwable
    {

    }

    @And("^I press \\\"([^\\\"]*)\\\"$")
    public void I_press(String arg1) throws Throwable
    {
        System.out.println(arg1);
    }

    @Then("^I should go to the \\\"([^\\\"]*)\\\" page$")
    public void I_should_go_to_the_page(String arg1) throws  Throwable
    {
        System.out.println(arg1);
        throw new PendingException();
    }

    @Given("I am on the new pet page")
    public void I_am_on_the_new_pet_page() throws Throwable
    {

    }
}

And when I start Cucumber java tests I got this in console:

 1 Scenarios (1 undefined)
 4 Steps (4 undefined)
 0m0.000s


 You can implement missing steps with the snippets below:

 Given("^I am on the 'New Pet' page$", () -> {
   // Write code here that turns the phrase above into concrete actions
 throw new PendingException();
 });

 Given("^I press \"([^\"]*)\"$", (String arg1) -> {
   // Write code here that turns the phrase above into concrete actions
   throw new PendingException();
 });

 Then("^I should go to the \"([^\"]*)\" page$", (String arg1) -> {
  // Write code here that turns the phrase above into concrete actions
   throw new PendingException();
 });

 Given("^I am on the new pet page$", () -> {
  // Write code here that turns the phrase above into concrete actions
  throw new PendingException();
 });


  Process finished with exit code 0
Cœur
  • 37,241
  • 25
  • 195
  • 267
  • How are you running your tests? Which dependencies are you using? – Marit Jan 11 '18 at 16:04
  • Does this answer your question? [IntelliJ with cucumber (java) and step definition location](https://stackoverflow.com/questions/15869851/intellij-with-cucumber-java-and-step-definition-location) – Mate Mrše Mar 06 '20 at 08:59

1 Answers1

0

Try to run tests with option -r features

Kirill
  • 1,530
  • 5
  • 24
  • 48