使用@RunWith(Cucumber.class)而不是@RunWith(CucumberWithSerenity.class)运行功能

问题描述 投票:0回答:1

我在Eclipse中收到此警告。知道如何解决吗?

[main] WARN cucumber.runtime.SerenityBackend - It looks like you are running a feature using @RunWith(Cucumber.class) instead of @RunWith(CucumberWithSerenity.class). Are you sure this is what you meant to do?

还有以下问题,尝试通过Serenity-Cucmber打开Goog​​le页面时:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/C:/Users/304090/.m2/repository/com/google/inject/guice/4.2.0/guice-4.2.0.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
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
    Given Open the google home page                                              # StepDefinitions.the_launch_link()
      java.lang.NullPointerException
    at org.apache.commons.lang3.SystemUtils.isJavaVersionAtLeast(SystemUtils.java:1654)
    at org.apache.commons.lang3.ClassUtils.isAssignable(ClassUtils.java:760)
    at net.thucydides.core.steps.StepFactory$ParameterAssignementChecker.cannotBeAssignedTo(StepFactory.java:332)
    at net.thucydides.core.steps.StepFactory.parametersMatchFor(StepFactory.java:242)
    at net.thucydides.core.steps.StepFactory.argumentTypesFrom(StepFactory.java:218)
    at net.thucydides.core.steps.StepFactory.immutableStepLibrary(StepFactory.java:212)
    at net.thucydides.core.steps.StepFactory.createProxyStepLibrary(StepFactory.java:203)
    at net.thucydides.core.steps.StepFactory.instantiateUniqueStepLibraryFor(StepFactory.java:179)
    at net.thucydides.core.steps.StepFactory.getUniqueStepLibraryFor(StepFactory.java:115)
    at net.serenitybdd.screenplay.Tasks.instrumented(Tasks.java:12)
    at net.serenitybdd.screenplay.actions.Open.url(Open.java:19)
    at step_defenitions.StepDefinitions.the_launch_link(StepDefinitions.java:30)
    at ✽.Open the google home page(C:/Users/304090/eclipse-workspace/evms-qa-test-automation/src/test/resources/features/CreatePreViolReport.feature:5)
selenium serenity-bdd cucumber-serenity
1个回答
0
投票

将宁静版本更改为最新版本后,此问题已解决。并且还必须更新我的浏览器版本。

© www.soinside.com 2019 - 2024. All rights reserved.