测试框架意外退出-空手道测试

时间:2019-11-25 13:54:49

标签: javascript java apache-kafka karate

我将一个空手道项目导入了Intellij。我已经把行家清理干净了。当我运行它时,我得到消息。测试框架意外退出并出现以下错误。

Testing started at 10:24 ...
C:\Users\oluseyiojo\Downloads\openjdk-11+28_windows-x64_bin\jdk-11\bin\java.exe -javaagent:C:\Users\oluseyiojo\.IntelliJIdea2019.2\system\testAgent\intellij-coverage-agent-1.0.508.jar=C:\Users\oluseyiojo\AppData\Local\Temp\coverageargs -Dorg.jetbrains.run.directory=C:\Users\oluseyiojo\IdeaProjects\vw-api-tests-karate\src\test\java\uk\co\vw\api\retailer "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2019.2.4\lib\idea_rt.jar=56821:C:\Program Files\JetBrains\IntelliJ IDEA 2019.2.4\bin" -Dfile.encoding=UTF-8 -classpath "C:\Users\oluseyiojo\IdeaProjects\vw-api-tests-karate\target\test-classes;C:\Users\oluseyiojo\.m2\repository\org\springframework\spring-jdbc\3.2.1.RELEASE\spring-jdbc-3.2.1.RELEASE.jar;C:\Users\oluseyiojo\.m2\repository\org\springframework\spring-tx\3.2.1.RELEASE\spring-tx-3.2.1.RELEASE.jar;C:\Users\oluseyiojo\.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\Users\oluseyiojo\.m2\repository\org\springframework\spring-beans\3.2.1.RELEASE\spring-beans-3.2.1.RELEASE.jar;C:\Users\oluseyiojo\.m2\repository\org\springframework\spring-core\3.2.1.RELEASE\spring-core-3.2.1.RELEASE.jar;C:\Users\oluseyiojo\.m2\repository\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;C:\Users\oluseyiojo\.m2\repository\mysql\mysql-connector-java\5.1.6\mysql-connector-java-5.1.6.jar;C:\Users\oluseyiojo\.m2\repository\com\intuit\karate\karate-apache\0.8.0.RC8\karate-apache-0.8.0.RC8.jar;C:\Users\oluseyiojo\.m2\repository\com\intuit\karate\karate-core\0.8.0.RC8\karate-core-0.8.0.RC8.jar;C:\Users\oluseyiojo\.m2\repository\com\jayway\jsonpath\json-path\2.1.0\json-path-2.1.0.jar;C:\Users\oluseyiojo\.m2\repository\net\minidev\json-smart\2.2\json-smart-2.2.jar;C:\Users\oluseyiojo\.m2\repository\net\minidev\accessors-smart\1.1\accessors-smart-1.1.jar;C:\Users\oluseyiojo\.m2\repository\org\ow2\asm\asm\5.0.3\asm-5.0.3.jar;C:\Users\oluseyiojo\.m2\repository\info\cukes\cucumber-java\1.2.5\cucumber-java-1.2.5.jar;C:\Users\oluseyiojo\.m2\repository\org\yaml\snakeyaml\1.18\snakeyaml-1.18.jar;C:\Users\oluseyiojo\.m2\repository\org\apache\httpcomponents\httpclient\4.5.5\httpclient-4.5.5.jar;C:\Users\oluseyiojo\.m2\repository\org\apache\httpcomponents\httpcore\4.4.9\httpcore-4.4.9.jar;C:\Users\oluseyiojo\.m2\repository\commons-codec\commons-codec\1.10\commons-codec-1.10.jar;C:\Users\oluseyiojo\.m2\repository\org\apache\httpcomponents\httpmime\4.5.5\httpmime-4.5.5.jar;C:\Users\oluseyiojo\.m2\repository\org\slf4j\jcl-over-slf4j\1.7.25\jcl-over-slf4j-1.7.25.jar;C:\Users\oluseyiojo\.m2\repository\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;C:\Users\oluseyiojo\.m2\repository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;C:\Users\oluseyiojo\.m2\repository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;C:\Users\oluseyiojo\.m2\repository\com\intuit\karate\karate-junit4\0.8.0.RC8\karate-junit4-0.8.0.RC8.jar;C:\Users\oluseyiojo\.m2\repository\info\cukes\cucumber-junit\1.2.5\cucumber-junit-1.2.5.jar;C:\Users\oluseyiojo\.m2\repository\info\cukes\cucumber-core\1.2.5\cucumber-core-1.2.5.jar;C:\Users\oluseyiojo\.m2\repository\info\cukes\cucumber-html\0.2.3\cucumber-html-0.2.3.jar;C:\Users\oluseyiojo\.m2\repository\info\cukes\cucumber-jvm-deps\1.0.5\cucumber-jvm-deps-1.0.5.jar;C:\Users\oluseyiojo\.m2\repository\info\cukes\gherkin\2.12.2\gherkin-2.12.2.jar;C:\Users\oluseyiojo\.m2\repository\junit\junit\4.12\junit-4.12.jar;C:\Users\oluseyiojo\.m2\repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;C:\Users\oluseyiojo\.m2\repository\net\masterthought\cucumber-reporting\3.18.0\cucumber-reporting-3.18.0.jar;C:\Users\oluseyiojo\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.9.5\jackson-databind-2.9.5.jar;C:\Users\oluseyiojo\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.9.0\jackson-annotations-2.9.0.jar;C:\Users\oluseyiojo\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.9.5\jackson-core-2.9.5.jar;C:\Users\oluseyiojo\.m2\repository\org\apache\velocity\velocity\1.7\velocity-1.7.jar;C:\Users\oluseyiojo\.m2\repository\commons-collections\commons-collections\3.2.1\commons-collections-3.2.1.jar;C:\Users\oluseyiojo\.m2\repository\commons-lang\commons-lang\2.4\commons-lang-2.4.jar;C:\Users\oluseyiojo\.m2\repository\velocity-tools\velocity-tools\1.4\velocity-tools-1.4.jar;C:\Users\oluseyiojo\.m2\repository\joda-time\joda-time\2.9.9\joda-time-2.9.9.jar;C:\Users\oluseyiojo\.m2\repository\org\apache\commons\commons-lang3\3.7\commons-lang3-3.7.jar;C:\Users\oluseyiojo\.m2\repository\commons-io\commons-io\2.6\commons-io-2.6.jar;C:\Users\oluseyiojo\.m2\repository\net\lingala\zip4j\zip4j\1.3.2\zip4j-1.3.2.jar;C:\Users\oluseyiojo\.m2\repository\org\codehaus\plexus\plexus-utils\3.1.0\plexus-utils-3.1.0.jar;C:\Users\oluseyiojo\.m2\repository\org\jsoup\jsoup\1.11.3\jsoup-1.11.3.jar;C:\Users\oluseyiojo\.m2\repository\com\googlecode\owasp-java-html-sanitizer\owasp-java-html-sanitizer\20180219.1\owasp-java-html-sanitizer-20180219.1.jar;C:\Users\oluseyiojo\.m2\repository\com\google\guava\guava\20.0\guava-20.0.jar;C:\Users\oluseyiojo\.m2\repository\commons-configuration\commons-configuration\1.10\commons-configuration-1.10.jar;C:\Users\oluseyiojo\.m2\repository\com\github\jsqlparser\jsqlparser\1.4\jsqlparser-1.4.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2019.2.4\plugins\junit\lib\junit-rt.jar;C:\Program Files\JetBrains\IntelliJ IDEA 2019.2.4\plugins\cucumber-java\lib\cucumber-jvmFormatter.jar" cucumber.api.cli.Main --plugin org.jetbrains.plugins.cucumber.java.run.CucumberJvmSMFormatter --monochrome --name "^News \- API returns a status 200 with valid Parameters$" --glue com.intuit.karate C:/Users/oluseyiojo/IdeaProjects/vw-api-tests-karate/src/test/java/uk/co/vw/api/retailer/contentRetailerIdNews_KUBE.feature
---- IntelliJ IDEA coverage runner ----
sampling ...
include patterns:
cucumber\.api\.cli\..*
exclude patterns:
Exception in thread "main" java.lang.NoClassDefFoundError: javafx/collections/ObservableList
at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3167)
at java.base/java.lang.Class.privateGetPublicMethods(Class.java:3192)
at java.base/java.lang.Class.getMethods(Class.java:1905)
at cucumber.runtime.java.MethodScanner.scan(MethodScanner.java:40)
at cucumber.runtime.java.JavaBackend.loadGlue(JavaBackend.java:86)
at cucumber.runtime.Runtime.<init>(Runtime.java:92)
at cucumber.runtime.Runtime.<init>(Runtime.java:70)
at cucumber.runtime.Runtime.<init>(Runtime.java:66)
at cucumber.api.cli.Main.run(Main.java:35)
at cucumber.api.cli.Main.main(Main.java:18)
Caused by: java.lang.ClassNotFoundException: javafx.collections.ObservableList
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 11 more
Class transformation time: 0.0380893s for 1199 classes or 3.1767556296914095E-5s per class

有人遇到这样的错误,如果有人可以帮忙,我将不胜感激。

enter image description here

3 个答案:

答案 0 :(得分:0)

能否请您升级到0.9.5.RC4并确认?此问题不再发生。

对于API测试,您可以认为该版本是稳定的。

答案 1 :(得分:0)

您收到JavaFX/collections/ObservableList的NoClassDefFoundError 您需要将JavaFX jar添加到类路径。

有关更多详细信息,请参见以下链接here

答案 2 :(得分:0)

您需要在类路径中包含以下两个jar:

  1. jre / lib / ext / jfxrt.jar
  2. jre / lib / jfxswt.jar

此空手道的确切问题已解决here,并由Peter Thomas解决。