In the previous article we have seen JBehave Hello World example. In this article we will see same Hello World example but with using Cucumber.
Below is the eclipse folder structure -
pom.xml
This class contains the hello world business logic that need to be tested using Cucumber
HelloWorld.java
This file contains cucumber test cases
hello-world.feature
This file contains the steps for BDD testing
HelloWorldSteps.java
This is the main class from where all the cucumber test cases are triggered. Test cases are included in .feature files. You can have one or more .feature files.
RunCucumberTest.java
Output -
hello-world.feature