我在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打开Google页面时:
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)
将宁静版本更改为最新版本后,此问题已解决。并且还必须更新我的浏览器版本。