Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to toggle report backup without running karate-junit5 in parallel

I’ve noticed that if I execute parallel tests with junit5 karate would backup reports by default:

//have report backup
@Test
    void runParallel() {
        Results results = Karate.run(String.join(File.separator,"classpath:steps")).tags("@Read")
                .reportDir(KARATE_REPORT_DIR)
                .outputJunitXml(true)
                .parallel(5);
        assertEquals(0, results.getFailCount(), results.getErrorMessages());
    }

But not the same when running a single test with karate-junit5 interface, even with backupReportDir(true)

// no report backup
    @Karate.Test
    Karate run(){
        return Karate.run("classpath:steps").tags("@Read")
                .backupReportDir(true)
                .reportDir(KARATE_REPORT_DIR)
                .outputJunitXml(true);
    }

Is it designed intentional or an issue?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

my pom

        <dependency>
            <groupId>com.intuit.karate</groupId>
            <artifactId>karate-junit5</artifactId>
            <version>1.2.0</version>
            <scope>test</scope>
        </dependency>

>Solution :

I honestly don’t remember. I personally don’t consider this a high priority so you are welcome to dive into the code and contribute a PR.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading