使用java/IntelliJ运行cucumber时出错

使用java/IntelliJ运行cucumber时出错,java,intellij-idea,cucumber,Java,Intellij Idea,Cucumber,我已经用intelliJ中的Java设置了cucumber,我刚刚将我的功能文件粘贴到我的steps文件并尝试运行它。它并不是在测试任何东西——它应该通过测试。但我收到了这个警告/错误。我正在通过教程学习,我完全按照步骤进行了学习,所以我不明白为什么会发生这种情况?有人能帮忙吗?错误如下: WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access

我已经用intelliJ中的Java设置了cucumber,我刚刚将我的功能文件粘贴到我的steps文件并尝试运行它。它并不是在测试任何东西——它应该通过测试。但我收到了这个警告/错误。我正在通过教程学习,我完全按照步骤进行了学习,所以我不明白为什么会发生这种情况?有人能帮忙吗?错误如下:

    WARNING: An illegal reflective access operation has occurred
    WARNING: Illegal reflective access by cucumber.deps.com.thoughtworks.xstream.core.util.Fields (file:/C:/Users/Kristian.Senior/.m2/repository/io/cucumber/cucumber-jvm-deps/1.0.6/cucumber-jvm-deps-1.0.6.jar) to field java.util.TreeMap.comparator
    WARNING: Please consider reporting this to the maintainers of cucumber.deps.com.thoughtworks.xstream.core.util.Fields
    WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
    WARNING: All illegal access operations will be denied in a future release

    Skipped step

    Skipped step

    Skipped step

    Skipped step

    1 Scenarios (1 pending)
    4 Steps (3 skipped, 1 pending)
    0m0.393s

    cucumber.api.PendingException: TODO: implement me
        at Steps.LoginFeature.iNavigateToTheLoginPage(LoginFeature.java:18)
        at ✽.I navigate to the login page(C:/Users/Kristian.Senior/CucumberBasics/src/test/java/Features/login.feature:6)
你得到了例外

cucumber.api.PendingException: TODO: implement me
        at Steps.LoginFeature.iNavigateToTheLoginPage(LoginFeature.java:18)
        at ✽.I navigate to the login page(C:/Users/Kristian.Senior/CucumberBasics/src/test/java/Features/login.feature:6)
它强制您实现异常中描述的步骤

执行如下步骤:

@When("I navigate to the login")
public void i_navigate_to_the_login() {
    System.out.printf("Navigating to login\n");
}
为了跳过这些步骤,您可以在
CucumberOptions

Strict:如果Strict选项设置为false,则在执行时如果 cucumber遇到任何未定义/挂起的步骤,cucumber则不会 执行失败,将跳过未定义的步骤并停止生成 成功

你得到了例外

cucumber.api.PendingException: TODO: implement me
        at Steps.LoginFeature.iNavigateToTheLoginPage(LoginFeature.java:18)
        at ✽.I navigate to the login page(C:/Users/Kristian.Senior/CucumberBasics/src/test/java/Features/login.feature:6)
它强制您实现异常中描述的步骤

执行如下步骤:

@When("I navigate to the login")
public void i_navigate_to_the_login() {
    System.out.printf("Navigating to login\n");
}
为了跳过这些步骤,您可以在
CucumberOptions

Strict:如果Strict选项设置为false,则在执行时如果 cucumber遇到任何未定义/挂起的步骤,cucumber则不会 执行失败,将跳过未定义的步骤并停止生成 成功


你应该实施“步骤”。你能给我举个例子吗?不知道你是什么意思等等,我明白了。我已经给出了步骤操作,但是测试仍然没有通过?@When(“Step”)public void Step(){//implementation}它在堆栈跟踪中说。实施步骤“我导航到登录页面”你应该实施“步骤”。你能给我举个例子吗?不知道你是什么意思等等,我明白了。我已经给出了步骤操作,但是测试仍然没有通过?@When(“Step”)public void Step(){//implementation}它在堆栈跟踪中说。实施步骤“我导航到登录页面”