为什么黄瓜功能文件步骤实现即使已链接也无法识别(可通过cmd+单击操作导航到方法)



我的场景为[![我的场景为][1]][1]

我能够cmd+点击并导航到步骤实现方法。但当我运行该场景时,我收到了这条消息。

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();
}

我在IntelliJ IDEA 2021.3.3(社区版(中做错了什么或遗漏了什么?[1] :https://i.stack.imgur.com/ak0So.png

您应该在CucumberOptions中检查glue

事实的来源,在这里,是黄瓜测试运行程序,而不是IDE。

"即使它们被链接(通过cmd+点击动作可导航到方法(";

IntelliJs的Gherkin插件扫描所有测试源代码中的步骤定义。即使您在工作区的子模块中有步骤定义,您的步骤定义也可以点击。

希望它能帮助

最新更新