user3780373
user3780373

Reputation:

Why cucumber feature file step implementation is not recognized even though they are linked(navigable to the methods by cmd+ click action)

I have my Scenario as [![my Scenario as][1]][1]

I am able to cmd+click and navigate to the step implementation methods. But I am getting this message when I run the scenario.

Step undefined
You can implement this step and 2 other step(s) using the snippet(s) below:

@Given("User enable app risk lookup in zconsole")
public void user_enable_app_risk_lookup_in_zconsole() {
    // Write code here that turns the phrase above into concrete actions
    throw new io.cucumber.java.PendingException();
}
@When("User install and activate a new zips app on a device")
public void user_install_and_activate_a_new_zips_app_on_a_device() {
    // Write code here that turns the phrase above into concrete actions
    throw new io.cucumber.java.PendingException();
}
@Then("User validate app risk lookup is enabled on the device")
public void user_validate_app_risk_lookup_is_enabled_on_the_device() {
    // Write code here that turns the phrase above into concrete actions
    throw new io.cucumber.java.PendingException();
}

What I am doing wrong or missing in my IntelliJ IDEA 2021.3.3 (Community Edition) ? [1]: https://i.sstatic.net/ak0So.png

Upvotes: 0

Views: 1099

Answers (1)

ocos
ocos

Reputation: 2244

You should check glue in your CucumberOptions.

The source of truth, here, is cucumber test runner not IDE.

"even though they are linked(navigable to the methods by cmd+ click action)"

IntelliJs Gherkin plugin scans all test source code for step definitions. Your step definition will be clickable even you have a step definition in a submodule in your workspace.

Hope, it helps

Upvotes: 0

Related Questions