我可以通过命令“mvn clean verify -Dcucumber.options="--tags @ValidateLoggedInUser"”
在终端窗口中成功运行
因为其他一些测试用例有错误。因此,我需要debug
检查步骤和原因。
但是在*.feature
文件中运行它会出错。
java.lang.NullPointerException在 com.cucumber.listener.Reporter.loadXMLConfig(Reporter.java:56)位于 com.dxc.vpc.automation.glue.CucumberUtilities.extentReport(CucumberUtilities.java:26) 在sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)处 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 在java.lang.reflect.Method.invoke(Method.java:498)在 banana.runtime.Utils $ 1.call(Utils.java:40)在 banana.runtime.Timeout.timeout(Timeout.java:16)在 黄瓜。运行时.Utils.invoke(Utils.java:34)在 黄瓜。运行时.java.JavaHookDefinition.execute(JavaHookDefinition.java:60) 在黄瓜。运行时间。运行时间。运行HookIfTagsMatch(运行时间.java:224)在 banana.runtime.Runtime.runHooks(Runtime.java:212)在 banana.runtime.Runtime.runBeforeHooks(Runtime.java:202)在 cuming.runtime.model.CucumberScenario.run(CucumberScenario.java:40) 在 黄瓜。运行时模型.CucumberFeature.run(CucumberFeature.java:165) 在黄瓜。运行。运行。运行(运行.java:122)在 banana.api.cli.Main.run(Main.java:36)在 cumul.api.cli.Main.main(Main.java:18)