Cucumber 并行运行期间未拾取测试,且未生成报告

Cucumber 并行运行期间未拾取测试,且未生成报告,cucumber,karate,cucumber-junit,Cucumber,Karate,Cucumber Junit,我试图运行空手道Api测试代码,但在并行运行期间,测试不会被空手道选项选中。黄瓜报告也没有生成 package com.karate.test; @KarateOptions(features="classpath:com/com/karate/test/workflow/",tags = "~@ignore") ) public class KarateTest { @Test public void testParallel() { System.setPr

我试图运行空手道Api测试代码,但在并行运行期间,测试不会被空手道选项选中。黄瓜报告也没有生成

package com.karate.test;
@KarateOptions(features="classpath:com/com/karate/test/workflow/",tags = "~@ignore")
)
public class KarateTest {

    @Test
    public void testParallel() {
        System.setProperty("karate.env", "qa1");
        Results results = Runner.parallel(getClass(), 2));
        generateReport(results.getReportDir());
        assertTrue(results.getErrorMessages(), results.getFailCount() == 0);
    }

    public static void generateReport(String karateOutputPath) {
        Collection<File> jsonFiles = FileUtils.listFiles(new File(karateOutputPath), new String[] {"json"}, true);
        List<String> jsonPaths = new ArrayList(jsonFiles.size());
        jsonFiles.forEach(file -> jsonPaths.add(file.getAbsolutePath()));
        Configuration config = new Configuration(new File("target"), "qa1");
        ReportBuilder reportBuilder = new ReportBuilder(jsonPaths, config);
        reportBuilder.generateReports();
    }
Gradle中的依赖项:

dependencies {
    testCompile 'com.intuit.karate:karate-apache:0.7.0'
    testCompile 'com.intuit.karate:karate-core:0.7.0'
    testCompile 'com.jayway.jsonpath:json-path:2.1.0'
    testCompile 'org.apache.httpcomponents:httpclient:4.5.5'
    testCompile 'org.apache.httpcomponents:httpcore:4.4.9'
    testCompile 'commons-codec:commons-codec:1.10'
    testCompile 'org.slf4j:jcl-over-slf4j:1.7.25'
    testCompile 'org.slf4j:slf4j-api:1.7.25'
    testCompile 'com.intuit.karate:karate-junit4:0.9.2'
    testCompile 'org.hamcrest:hamcrest-core:1.3'
    testCompile 'net.masterthought:cucumber-reporting:4.6.0'

    compile 'org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M3'
    compile 'org.apache.maven.surefire:surefire:3.0.0-M3'
    compile group: 'org.apache.geronimo.specs', name: 'geronimo-jms_1.1_spec', version: '1.1.1'
}

您最好按照以下说明操作:

但仅仅是一个观察,也许是这个错字重复/com造成的

features="classpath:com/com/karate/test/workflow/"

它使用的是最新版本。已升级到最新版本

`testCompile'com.intuit.karate:karate-junit4:0.9.2' testCompile'com.intuit.karate:karate-apache:0.9.2' testCompile'com.intuit.karate:karate核心:0.9.2'


供其他人参考:

不,这只是在安装stackoverflow之前编辑代码时的一个错误。实际路径没有。@safiuz很好,希望其他人能帮助您使用最新版本。已升级到最新版本。testCompile'com.intuit.karate:karate-junit4:0.9.2'testCompile'com.intuit.karate:karate-apache:0.9.2'testCompile'com.intuit.karate:karate-core:0.9.2'@safiuz很棒!建议你自己添加一个答案,这样你就不会让这个问题悬而未决——或者删除它

features="classpath:com/com/karate/test/workflow/"