1

Junit5 Runner

package com.tests;

import com.intuit.karate.junit5.Karate;

public class FakeJsonServerRunnerTest {
    @Karate.Test
    Karate testSample() {
        return Karate.run("classpath:com/tests").relativeTo(getClass());

    }
}

Parallel Runner

package com.tests;

import static org.junit.jupiter.api.Assertions.assertEquals;

import org.junit.jupiter.api.Test;

import com.intuit.karate.Results;
import com.intuit.karate.Runner;

public class FakeJsonServerParallelRunnerTest {

    @Test
    void testParallel() {
        Results results = Runner.path("classpath:com/tests")
                .tags("~@ignore")
                //.outputCucumberJson(true)
                .parallel(9);
        assertEquals(0, results.getFailCount(), results.getErrorMessages());
    }
}

Junit5 runner is not generating karate summary.html file in console when package path is given. Individual feature file reports is generating in target folder. Is it possible to view the summary report file in console, when package is mentioned.Same case is working for parallel runner.

cyrilgeorge153
  • 331
  • 1
  • 2
  • 9
  • if the linked answer does not answer your question, please contribute code – Peter Thomas Aug 30 '23 at 10:13
  • 1
    @Peter I was trying to get a clarity on Junit Runner and got it from your linked answer. – cyrilgeorge153 Aug 30 '23 at 12:52
  • 1
    yes, thanks. as far as I know, you should get a "summary report" from even the junit runner, so if it is not working, maybe karate needs fixes, but we hope others can contribute. our priority is to make sure the runner API works – Peter Thomas Aug 30 '23 at 13:06
  • summary report is generating for junit runner when individual feature file is specified. But I have multiple feature files in com.tests package so I was trying to run all feature files by mentioning only the package name, but in this case karate summary report does not generated. So I checked with the parallel runner and it was working when package is mentioned. So I raised a question to check whether this is expected behaviour of junit runner. – cyrilgeorge153 Aug 30 '23 at 13:14

0 Answers0