Karate 如何在VSCode上运行自定义空手道项目

Karate 如何在VSCode上运行自定义空手道项目,karate,Karate,我正在用自定义Java库在IntelliJ上编写一个测试项目。为了使用空手道插件的调试功能,可以通过VSCode运行它吗?如果我尝试运行它,会出现以下错误: [INFO] Scanning for projects... Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- metadata.xml Downloading from central: http

我正在用自定义Java库在IntelliJ上编写一个测试项目。为了使用空手道插件的调试功能,可以通过VSCode运行它吗?如果我尝试运行它,会出现以下错误:

[INFO] Scanning for projects...
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- 
metadata.xml
Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml 
(20 kB at 23 kB/s)
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven- 
metadata.xml (14 kB at 15 kB/s)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.954 s
[INFO] Finished at: 2020-10-27T16:50:14+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix '.options=c' in the current project and in the plugin groups 
[org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local 
(C:\Users\asd\.m2\repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following 
articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException
The terminal process "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -Command mvn clean 
test -f "c:\Users\asd\Documents\test-karate\com.testK\com.testK-karate\pom.xml" - 
Dtest=_SyncRunner "-Dkarate.options=c:\Users\asd\Documents\test-karate\com.testK\com.testK- 
karate\src\test\java\test.feature" " 
terminated with exit code: 1.

项目在IntelliJ上正确运行。

从命令中可以清楚地看出您正在使用Powershell。请将VS代码“默认外壳”切换到cmd。您可以在此处找到说明:


从命令中可以清楚地看出,您正在使用Powershell。请将VS代码“默认外壳”切换到cmd。您可以在此处找到说明:


我将ping插件的开发人员查看这里。同时,考虑将以前的问题的答案标记为<代码>接受< /代码>。同时考虑将以前的问题的答案标记为<代码>接受< /代码>,现在我得到<代码> >错误,无法执行目标org。Apache .Maven。插件:Maven SureFieldPuel:2.22.2:项目COM.TESTK上的测试(默认测试):没有执行任何测试!(设置-DfailIfNoTests=false忽略此错误。)->[Help 1]终端进程“C:\WINDOWS\System32\cmd.exe/d/C mvn clean test-f”C:\Users\asd\Documents\test karate\com.testK-karate\pom.xml”-Dtest=\u SyncRunner“-Dkarate.options=C:\Users\asd\Documents\test karate\com.testK\com.testK-karate\pom.xml”终止时退出代码为:1。如果我运行debug,我会得到:
错误:无法找到或加载主类com.intuit.karate.main终端进程“C:\WINDOWS\System32\cmd.exe/d/C java-cp karate.jar;karate robot.jar;.com.intuit.karate.main-d”终止时退出代码为:1。
@Leonardo好的,我要放弃:)插件有一些设置,您需要正确设置。还可以扫描如下问题:现在我发现
[ERROR]无法在project com.testK上执行目标org.apache.maven.plugins:maven surefire plugin:2.22.2:test(默认测试):没有执行任何测试!(设置-DfailIfNoTests=false忽略此错误。)->[Help 1]终端进程“C:\WINDOWS\System32\cmd.exe/d/C mvn clean test-f”C:\Users\asd\Documents\test karate\com.testK-karate\pom.xml”-Dtest=\u SyncRunner“-Dkarate.options=C:\Users\asd\Documents\test karate\com.testK\com.testK-karate\pom.xml”终止时退出代码为:1。
如果我运行debug,我会得到:
错误:无法找到或加载主类com.intuit.karate.main终端进程“C:\WINDOWS\System32\cmd.exe/d/C java-cp karate.jar;karate robot.jar;.com.intuit.karate.main-d”终止时退出代码为:1。
@Leonardo好的,我要放弃:)插件有一些设置,您需要正确设置。还可以扫描以下问题: