1

Were there any group of folks, who were successful with Karate DSL, using Gradle and Junit5 runner?

Should it be @Karate.Test or @Test?

    import com.intuit.karate.junit5.Karate;


            class myRunner {

                @Test
                Karate mySample() {
                    return Karate.run("myFeature").relativeTo(getClass());
                }

                @Karate.Test
                void myParallelTest() {
                    Results results = Runner.path("classpath:examples").tags("~@skipme").parallel(5);
                    assertEquals(0, results.getFailCount(), results.getErrorMessages());
                }
            }

If I am lucky enough, I wanted to achieve performance testing after this with gatling in Gradle.

Maaza
  • 79
  • 1
  • 1
  • 8

1 Answers1

2

You can just use the normal @Test annotation if you use the Runner API. The JUnit support is just a convenience that you may not need.

Refer to this answer for details: https://stackoverflow.com/a/69298540/143475

Trying to fix this (if there is really an issue) is not a priority for the project developers. We hope that people like you who may be more enthusiastic about Gradle will step forward to contribute code :)

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248
  • thanks for the answer. I will seriously work on a simple project to cover gradle and gatling areas. – Maaza Oct 01 '21 at 19:17