“You can ask Kotest to run specs in parallel to ta...
# kotest
c
“You can ask Kotest to run specs in parallel to take advantage of modern cpus with several cores by setting the parallelism level (default is 1).. Tests inside a spec are always executed sequentially.” is that still true?
it seems running tests of one spec in parallel works only for single instance mode. why is that?
oh it seems the 4.4 version has a concurrency mode all. ist that going to work in instance per test mode?
i have now converted the test suite from one of my open source project from minutest to kotest and the tests look cleaner but it also takes 20 seconds instead of 8 seconds to run.
tried with the 4.4 snapshot. seems to also not run tests of one spec in parallel with instance per test.
s
The 4.4 snapshot isn't ready yet but the new concurrency mode will run all tests in parallel not just specs. Also increase the parallelism settings for more threads
What options does minutest have for concurrency and what's the link to your oss project. I'm away atm but I'll look when I'm back unless someone gets there first.
c
minutest just uses junit5, I’m using the parallel test running support from there
s
Ok i see
c
thats my junit5 settings:
Copy code
junit.jupiter.execution.parallel.enabled=true
junit.jupiter.execution.parallel.mode.default=concurrent
anyway if parallel test is planned for 4.4 I’m fine. its ok if the test suite is a bit slower for now
s
Right but the current parallel mode is like junits. The new one is for coroutines and is an addition.
Try setting env var kotest.parallelism to 4 or 8 or whatever
c
ok but junit seems to run tests inside one class in parallel while kotest does not.
s
Yeah that's correct
4.4 solves that too
c
i have this:
Copy code
object KotestConfig : AbstractProjectConfig() {
    override val parallelism = Runtime.getRuntime().availableProcessors()
s
It'll be released end of Nov
c
btw does the kotest gradle plugin support test reports? it seems there is a directory but no files in it
s
It currently doesn't generate a report, but one will be added before the final release
293 Views