Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

io.cucumber.junit.UndefinedStepException: The step "user is on login page" is undefined. You can implement it using the snippet(s) below: #9

Open
SamJackMason opened this issue Feb 10, 2022 · 0 comments

Comments

@SamJackMason
Copy link

SamJackMason commented Feb 10, 2022

I did the same setup completely and updated Project and no errors, but when i ran from TestRunner not sure why its says the below error

Also my "src/test/java" and "src/test/resources" looks like greyed out, not sure i need to choose any build path, please help me out

Also i added monochrome = true, but still i am seeing the below error on undefined steps

package testrunners;
import org.junit.runner.RunWith;
import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
@RunWith(Cucumber.class)
@CucumberOptions(features = {"src/test/resources/parallel/LoginPage.feature"},
glue = { "stepdefinitions", "AppHooks" },
plugin = {"pretty"
}
)

public class MyTestRunner {}

Below Issue i am seeing

io.cucumber.junit.UndefinedStepException: The step "user is on login page" is undefined. You can implement it using the snippet(s) below:

@given("user is on login page")
public void user_is_on_login_page() {
// Write code here that turns the phrase above into concrete actions
throw new io.cucumber.java.PendingException();
}

Some other steps were also undefined:

@when("user gets the title of the page")
public void user_gets_the_title_of_the_page() {
// Write code here that turns the phrase above into concrete actions
throw new io.cucumber.java.PendingException();
}
@then("page title should be {string}")
public void page_title_should_be(String string) {
// Write code here that turns the phrase above into concrete actions
throw new io.cucumber.java.PendingException();
}

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant