IntelliJ with cucumber (java) and step definition location

后端 未结 6 1979
故里飘歌
故里飘歌 2020-12-09 06:02

Ok, so I\'m working on a project using IntelliJ and trying to take advantage of its cucumber functionality. I\'ve not worked with the java flavour of cucumber, but IntelliJ

6条回答
  •  囚心锁ツ
    2020-12-09 06:24

    It is really nonsense :) but in in my case when IDEA refused to add steps definition automatically due to some plugins installed, e.g. Cucumber for Scala and suggested deleting them that i cant since i need them in other project. So, long story short, to add (Create step definition) you need to create Class in 'glue' dir and some fake Cucumber implementation, build one more time and it resolved my issue.

     Background:
     When I use IDEA 2018.2
     And Java 8
     And Cucumber info.cukes:cucumber-java:1.2.4
    
     @When("^I created a Class and put there fake step implementation$")
     @And("^I run gradle build one more time :)$")
     @Then("^This Class will be able for me from the feature file by ALT+ENTER as usual$")
     @And("^It resolved my issue when I was not able to automatically generate step definition$")
    

提交回复
热议问题