1

I know that there is some similar issue, but I have some problem with bind steps to feature cucumber file. This is my cucumber runner

  @RunWith(Cucumber.class)
  public class CucumberTests {

  }

annotation

 @Target(ElementType.TYPE)
 @Retention(RetentionPolicy.RUNTIME)
 @SpringBootTest(classes = AppRunner.class)
 @RunWith(Cucumber.class)
 @interface CucumberSteps {

 }

steps

    @CucumberSteps
    public class QueueSenderStepsDefs {

        @Given("^I have item$")
        public void iHaveItem() throws Throwable {
            System.out.println("Asd");
        }

        @When("^I send it to jmsQueueSender$")
        public void iSendItToJmsQueueSender() throws Throwable {
            System.out.println("dff");
        }

        @Then("^item is on queue$")


   public void itemIsOnQueue() throws Throwable {
        System.out.println("sdasdsa");
    }
}

I always get "You can implement missing steps with the snippets below: ". I use InteliJ IDEA and I have set glue in configuration. But still doesn't works. Can you help me?

Do Nhu Vy
  • 33,131
  • 37
  • 143
  • 202
RafalQA
  • 97
  • 1
  • 3
  • 12

1 Answers1

0

Can you also copy in your feature? And try using glue/feature in your cucumber options just to make sure it's looking in the right place for your files. Similar to the below.

@CucumberOptions(
features ="src/test/java/",
glue = "packagename")

I also located a question that may assist you as it seems similar in nature Cucumber Test a Spring Boot Application

Community
  • 1
  • 1
canpan14
  • 977
  • 9
  • 27