如何解决严重:当我尝试运行功能文件时无法启动 Cucumber 错误
我刚刚创建了功能文件和 POM,我尝试将功能文件作为 Cucumber 功能运行,但它显示如下错误,请告诉我我需要做什么?我安装了 Cucumber 插件,我使用了最新版本的 Cucumber 6.10.2,我做错了我知道请帮我解决这个问题。然后我检查了功能路径也是正确的,我尝试使用运行配置运行,因为我为功能文件设置了正确的路径,甚至认为它是正确的,显示相同的错误?我卸载安装了很多次都试过还是没有解决。
这是我得到的控制台错误
SEVERE: Unable to start Cucumber
io.cucumber.core.exception.CucumberException: No backends were found. Please make sure you have a backend module on your CLAsspATH.
at io.cucumber.core.runtime.BackendServiceLoader.get(BackendServiceLoader.java:39)
at io.cucumber.core.runtime.BackendServiceLoader.get(BackendServiceLoader.java:33)
at io.cucumber.core.runtime.SingletonRunnersupplier.createRunner(SingletonRunnersupplier.java:45)
at io.cucumber.core.runtime.SingletonRunnersupplier.get(SingletonRunnersupplier.java:37)
at io.cucumber.core.runtime.CucumberExecutionContext.getRunner(CucumberExecutionContext.java:128)
at io.cucumber.core.runtime.CucumberExecutionContext.runTestCase(CucumberExecutionContext.java:115)
at io.cucumber.core.runtime.Runtime.lambda$execute$6(Runtime.java:110)
at java.util.concurrent.Executors$RunnableAdapter.call(UnkNown Source)
at java.util.concurrent.FutureTask.run(UnkNown Source)
at io.cucumber.core.runtime.Runtime$SameThreadExecutorService.execute(Runtime.java:233)
at java.util.concurrent.AbstractExecutorService.submit(UnkNown Source)
at io.cucumber.core.runtime.Runtime.lambda$run$2(Runtime.java:86)
at java.util.stream.ReferencePipeline$3$1.accept(UnkNown Source)
at java.util.stream.SliceOps$1$1.accept(UnkNown Source)
at java.util.ArrayList$ArrayListSpliterator.tryAdvance(UnkNown Source)
at java.util.stream.ReferencePipeline.forEachWithCancel(UnkNown Source)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(UnkNown Source)
at java.util.stream.AbstractPipeline.copyInto(UnkNown Source)
at java.util.stream.AbstractPipeline.wrapAndcopyInto(UnkNown Source)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(UnkNown Source)
at java.util.stream.AbstractPipeline.evaluate(UnkNown Source)
at java.util.stream.ReferencePipeline.collect(UnkNown Source)
at io.cucumber.core.runtime.Runtime.run(Runtime.java:87)
at io.cucumber.core.cli.Main.run(Main.java:92)
at cucumber.api.cli.Main.run(Main.java:30)
at cucumber.api.cli.Main.main(Main.java:15)
Mar 27,2021 12:20:49 AM io.cucumber.core.runtime.Runtime run
SEVERE: Exception while executing pickle
java.util.concurrent.ExecutionException: io.cucumber.core.exception.CucumberException: No backends were found. Please make sure you have a backend module on your CLAsspATH.
at java.util.concurrent.FutureTask.report(UnkNown Source)
at java.util.concurrent.FutureTask.get(UnkNown Source)
at io.cucumber.core.runtime.Runtime.run(Runtime.java:93)
at io.cucumber.core.cli.Main.run(Main.java:92)
at cucumber.api.cli.Main.run(Main.java:30)
at cucumber.api.cli.Main.main(Main.java:15)
Caused by: io.cucumber.core.exception.CucumberException: No backends were found. Please make sure you have a backend module on your CLAsspATH.
at io.cucumber.core.runtime.BackendServiceLoader.get(BackendServiceLoader.java:39)
at io.cucumber.core.runtime.BackendServiceLoader.get(BackendServiceLoader.java:33)
at io.cucumber.core.runtime.SingletonRunnersupplier.createRunner(SingletonRunnersupplier.java:45)
at io.cucumber.core.runtime.SingletonRunnersupplier.get(SingletonRunnersupplier.java:37)
at io.cucumber.core.runtime.CucumberExecutionContext.getRunner(CucumberExecutionContext.java:128)
at io.cucumber.core.runtime.CucumberExecutionContext.runTestCase(CucumberExecutionContext.java:115)
at io.cucumber.core.runtime.Runtime.lambda$execute$6(Runtime.java:110)
at java.util.concurrent.Executors$RunnableAdapter.call(UnkNown Source)
at java.util.concurrent.FutureTask.run(UnkNown Source)
at io.cucumber.core.runtime.Runtime$SameThreadExecutorService.execute(Runtime.java:233)
at java.util.concurrent.AbstractExecutorService.submit(UnkNown Source)
at io.cucumber.core.runtime.Runtime.lambda$run$2(Runtime.java:86)
at java.util.stream.ReferencePipeline$3$1.accept(UnkNown Source)
at java.util.stream.SliceOps$1$1.accept(UnkNown Source)
at java.util.ArrayList$ArrayListSpliterator.tryAdvance(UnkNown Source)
at java.util.stream.ReferencePipeline.forEachWithCancel(UnkNown Source)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(UnkNown Source)
at java.util.stream.AbstractPipeline.copyInto(UnkNown Source)
at java.util.stream.AbstractPipeline.wrapAndcopyInto(UnkNown Source)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(UnkNown Source)
at java.util.stream.AbstractPipeline.evaluate(UnkNown Source)
at java.util.stream.ReferencePipeline.collect(UnkNown Source)
at io.cucumber.core.runtime.Runtime.run(Runtime.java:87)
... 3 more
0 Scenarios
0 Steps
0m0.237s
?????????????????????????????????????????????????????????????????????????????????????
? Share your Cucumber Report with your team at https://reports.cucumber.io ?
? Activate publishing with one of the following: ?
? ?
? src/test/resources/cucumber.properties: cucumber.publish.enabled=true ?
? src/test/resources/junit-platform.properties: cucumber.publish.enabled=true ?
? Environment variable: CUCUMBER_PUBLISH_ENABLED=true ?
? JUnit: @CucumberOptions(publish = true) ?
? ?
? More information at https://reports.cucumber.io/docs/cucumber-jvm ?
? ?
? disable this message with one of the following: ?
? ?
? src/test/resources/cucumber.properties: cucumber.publish.quiet=true ?
? src/test/resources/junit-platform.properties: cucumber.publish.quiet=true ?
?????????????????????????????????????????????????????????????????????????????????????
Exception in thread "main" io.cucumber.core.exception.CucumberException: io.cucumber.core.exception.CucumberException: No backends were found. Please make sure you have a backend module on your CLAsspATH.
at io.cucumber.core.runtime.CucumberExecutionContext.getException(CucumberExecutionContext.java:82)
at io.cucumber.core.runtime.Runtime.run(Runtime.java:103)
at io.cucumber.core.cli.Main.run(Main.java:92)
at cucumber.api.cli.Main.run(Main.java:30)
at cucumber.api.cli.Main.main(Main.java:15)
Caused by: io.cucumber.core.exception.CucumberException: No backends were found. Please make sure you have a backend module on your CLAsspATH.
at io.cucumber.core.runtime.BackendServiceLoader.get(BackendServiceLoader.java:39)
at io.cucumber.core.runtime.BackendServiceLoader.get(BackendServiceLoader.java:33)
at io.cucumber.core.runtime.SingletonRunnersupplier.createRunner(SingletonRunnersupplier.java:45)
at io.cucumber.core.runtime.SingletonRunnersupplier.get(SingletonRunnersupplier.java:37)
at io.cucumber.core.runtime.CucumberExecutionContext.getRunner(CucumberExecutionContext.java:128)
at io.cucumber.core.runtime.CucumberExecutionContext.runTestCase(CucumberExecutionContext.java:115)
at io.cucumber.core.runtime.Runtime.lambda$execute$6(Runtime.java:110)
at java.util.concurrent.Executors$RunnableAdapter.call(UnkNown Source)
at java.util.concurrent.FutureTask.run(UnkNown Source)
at io.cucumber.core.runtime.Runtime$SameThreadExecutorService.execute(Runtime.java:233)
at java.util.concurrent.AbstractExecutorService.submit(UnkNown Source)
at io.cucumber.core.runtime.Runtime.lambda$run$2(Runtime.java:86)
at java.util.stream.ReferencePipeline$3$1.accept(UnkNown Source)
at java.util.stream.SliceOps$1$1.accept(UnkNown Source)
at java.util.ArrayList$ArrayListSpliterator.tryAdvance(UnkNown Source)
at java.util.stream.ReferencePipeline.forEachWithCancel(UnkNown Source)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(UnkNown Source)
at java.util.stream.AbstractPipeline.copyInto(UnkNown Source)
at java.util.stream.AbstractPipeline.wrapAndcopyInto(UnkNown Source)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(UnkNown Source)
at java.util.stream.AbstractPipeline.evaluate(UnkNown Source)
at java.util.stream.ReferencePipeline.collect(UnkNown Source)
at io.cucumber.core.runtime.Runtime.run(Runtime.java:87)
... 3 more
解决方法
在尝试解决此错误一周后,我得到了解决方案,感谢上帝的恩典,我在 Web 上针对不同的问题找到了一个解决方案,但我针对我的问题尝试了该解决方案,
只需转到.m2文件夹>>存储库>>删除所有文件 然后在 Eclipse Project >> clean >> All project
然后运行项目成功
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。