I have the below cucumber feature without any corresponding java code actions.
@CucumberTest
Scenario: Testing cucumber
Given I have this test.
When I test This
Then I get this
When I run it I get the following results
1 Scenarios (1 undefined)
3 Steps (3 undefined)
0m0.000s
You can implement missing steps with the snippets below:
Given("^I have this test\\.$", () -> {
// Write code here that turns the phrase above into concrete actions
throw new PendingException();
});
When("^I test This$", () -> {
// Write code here that turns the phrase above into concrete actions
throw new PendingException();
});
Then("^I get this$", () -> {
// Write code here that turns the phrase above into concrete actions
throw new PendingException();
});
But I want the missing steps to be in java like the following :
@Given("^I have this test\\.$")
public void I_have_this_test() throws Throwable {
// Write code here that turns the phrase above into concrete actions
throw new PendingException();
}
Can anyone help me how I can achieve this ?