I am trying to run a simple example of cucumber-Junit in Intellij, but not geting error "Test ignored". (I have installed cucumber for Java plugin)
My feature file, Runner class, Stepdefinition class and java class look as below:
I also tried to restructure the stepdefinition and feature file in multiple ways but it did not help.
1) Does the error mean, it is not finding stepdefinition file (Feature1Steps.java) ? if yes, how do I make it find it ?
2) I am not able to run feature file (Feature1.feature) either. It says : "Test Framework quit unexpectedly"
3) I have tried 1) and 2) with both the latest Cucumber for Java plugin and an older one (183.4284.148). But that did not solve the issue.
Could someone please help me here ?
Well, I did change multiple things and would like to post it here..
1) The words in scenario in feature file and step definition file are case sensitive so I corrected it. (in feature file when I write "Given that I have a Calculator", then in step definition file also I should write ( @Given("^that I have a Calculator$")). Earlier I had small c (calculator) in first step of my step definition file.
2) I just put stepdefinition file and Runnerclass files in the same package and feature file in resources folder. see screenshot below:
After having this structure I do not require to specify glue at all in Cucumber options in Runner class. I just require to specify where my feature file exists. see below:
3) now I am using cucumber version 4.2.0. But that did not make any difference I think.
I hope this helps others.