Cucumber 1st Handson
Cucumber 1st Handson
cd maven-cucumber
and enter ls. You will find pom.xml and src folder.
$ vi RunPlayTest.java
Once you have created java file, hit i to insert the code.
package com.play.bdd.runner;
import cucumber.api.CucumberOptions;
import cucumber.api.junit.Cucumber;
import org.junit.runner.RunWith;
@RunWith(Cucumber.class)
@CucumberOptions(
format = { "pretty", "html:target/cucumber" },
features = "classpath:cucumber/play.feature"
)
public class RunPlayTest {
}
Enter :wq to save the folder.
-------------------
cd ../steps/
$ vi PlaySteps.java
Hit i and copy this steps which you got in previous execution.
package com.play.bdd.steps;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
------------
cd ../../../../../resources/cucumber
vi play.feature
---------------------------
cd /root/maven-cucumber/