....< cucumber.cli.Main --format org.jetbrains.plugins.cucumber.java.run-6ren">
gpt4 book ai didi

intellij-idea - IntelliJ Cucumber-jvm 插件不运行测试

转载 作者:行者123 更新时间:2023-12-04 04:33:55 25 4
gpt4 key购买 nike

运行 .feature 文件给了我以下错误:

  " >....< cucumber.cli.Main --format org.jetbrains.plugins.cucumber.java.run.CucumberJvmSMFormatter --monochrome --glue C:/projects/selenium-parent/selenium/src/test/resources/InformationPage.feature
Testing started at 09:20 ...


Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
at com.sun.proxy.$Proxy13.feature(Unknown Source)
at cucumber.runtime.model.CucumberFeature.run(CucumberFeature.java:108)
at cucumber.runtime.Runtime.run(Runtime.java:94)
at cucumber.runtime.Runtime.run(Runtime.java:82)
at cucumber.cli.Main.run(Main.java:20)
at cucumber.cli.Main.main(Main.java:12)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at cucumber.runtime.RuntimeOptions$1.invoke(RuntimeOptions.java:94)
... 11 more
Caused by: java.lang.NoSuchMethodError: gherkin.formatter.model.Feature.getLine()Ljava/lang/Integer;
at org.jetbrains.plugins.cucumber.java.run.CucumberJvmSMFormatter.feature(CucumberJvmSMFormatter.java:89)
... 16 more

Process finished with exit code 1
Empty test suite.

如果我通过 JUnit 测试调用该功能文件,则该功能文件有效。那么它为什么要报告 空测试套件?
Feature: Information Page

Scenario: Has expected components
Given I navigate to the information page
Then I should see the table component

最佳答案

这是因为我没有安装最新的 cucumber jvm 插件。

关于intellij-idea - IntelliJ Cucumber-jvm 插件不运行测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20090829/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com