【发布时间】:2018-10-27 05:26:03
【问题描述】:
我是 Cucumber 框架的新手,并使用 Cucumber 框架设计了一个 selenium maven 项目。 但是我上周一直在努力解决一个问题,我已经在互联网上探索了所有可能的解决方案。例如。将运行器和步骤定义文件放在 src/test 目录下,将功能文件放在 test/resources 目录下..还有很多事情,我从头到尾尽了一切可能,但没有什么能帮助我。 我在底部分享了@987654321@。 这是我遇到的问题-
-----------问题/错误 -------------- -------------------------------------------
1 个场景 (�[33m1 undefined�[0m) 3 步 (�[33m3 undefined�[0m) 0m0.000s
您可以使用下面的 sn-ps 实现缺少的步骤:
@given("^User is already on login page$")
public void user_is_already_on_login_page() throws Throwable {
// Write code here that turns the phrase above into concrete actions
throw new PendingException();
}
@when("^title of login page is Free CRM$")
public void title_of_login_page_is_Free_CRM() throws Throwable {
// Write code here that turns the phrase above into concrete actions
throw new PendingException();
}
@then("^user enters username and password$")
public void user_enters_username_and_password() throws Throwable {
// Write code here that turns the phrase above into concrete actions
throw new PendingException();
}
项目在 git hub 上可用 -
【问题讨论】:
-
您是否尝试过设置glue="stepDefinition"。 Maven 会自动获取 src\test 文件夹下的测试,所以如果使用 maven 执行,那将是一个更好的选择。
-
检查我的更新答案
标签: java git cucumber cucumber-jvm