为什么黄瓜功能文件步骤实现无法识别,即使它们已链接(可通过 cmd+ 单击操作导航到方法)
我有我的场景 [![我的方案AS] [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.sstatic.net/ak0so.png
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该在
cucumberoptions
中检查胶水
。在这里,真理的来源是黄瓜测试跑者而不是IDE。
Intellijs Gherkin插件扫描了所有测试源代码的步骤定义。即使您在工作区中的子模块中有一个步骤定义,您的步骤定义也可以单击。
希望,它有帮助
You should check
glue
in yourCucumberOptions
.The source of truth, here, is cucumber test runner not IDE.
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