kotest-intellij-plugin icon indicating copy to clipboard operation
kotest-intellij-plugin copied to clipboard

KoTest run configuration does not have options to run test repeatedly

Open bliessens opened this issue 1 year ago • 3 comments

The JUnit run configuration has options to run a test repeatedly: given number of executions, until failure, ...

image

KoTest run configuration do not have this option.

bliessens avatar Jun 21 '24 09:06 bliessens

You can easily configure the test itself to repeat N times.

Kantis avatar Jun 21 '24 17:06 Kantis

I found this deprecated method but it doesn't seem to work:

override fun defaultTestCaseConfig(): TestCaseConfig? = TestCaseConfig(invocations = 1_000)

bliessens avatar Jun 23 '24 18:06 bliessens

Do you want to do it for all tests, or a particular test?

For a particular test, you add .config(invocations = N) to the test itself. Like:

      "Value provided (cents) should be converted to whole SEK".config(invocations = 100) {
         Amount(100, 25).vatAmount shouldBe BigDecimal.valueOf(0.25)
      }

Kantis avatar Jun 23 '24 18:06 Kantis

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 26 '25 14:04 stale[bot]