Java 严重:尝试运行功能文件时出现无法启动错误

Java 严重:尝试运行功能文件时出现无法启动错误,java,automation,cucumber,feature-file,Java,Automation,Cucumber,Feature File,我刚刚创建了功能文件和POM,我尝试将功能文件作为Cucumber功能运行,但它显示错误如下,请告诉我需要做什么?我安装了Cucumber插件,我使用的是Cucumber 6.10.2的最新版本,我犯的错误我不知道,请帮助我解决这个问题。然后我也检查了功能路径是否正确,我尝试使用运行配置运行,因为我为功能文件设置了正确的路径,尽管它是正确的,但显示的是相同的错误??我卸载和安装了很多次,并尝试尚未得到解决方案 这就是我得到的控制台错误 SEVERE: Unable to start Cucumb

我刚刚创建了功能文件和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

我在尝试解决这个错误一周后得到了解决方案,上帝保佑,我在网上找到了一个解决不同问题的方案,但我尝试了解决我的问题

只需转到.m2文件夹>>存储库>>删除所有文件 然后在eclipse项目中>>清除>>所有项目


然后运行项目获得成功

欢迎Rama!你的问题看起来格式很糟糕。我肯定那是个错误。请不要过度使用标题。同时提供您的POM文件,以便我们能够复制。。功能文件可能会有帮助。