I've been working on a Scala application. To do it properly, I want the kernel of my code to be completely covered by tests. To do that, I'm using the SCCT plugin for SBT.
Unfortunately, my tests rely on an in-memory database (h2). Therefore, my tests cannot run in parallel. However, sbt runs all tasks in parallel by default.
To solve this, I've modified build.sbt
file to disable parallel execution of the tests as:
parallelExecution in Test := false
The problem with the build configuration is that to generate code coverage, I need to run sbt scct:test
rather than sbt test
.
I've tried to disable the parallel execution of scct:test
but the code below does not compile:
parallelExecution in scct:test := false
Can anyone help me by either disabling the parallel execution in scct:test
by either setting the flag, or by making scct:test
run in the test context?
I think the task name is actually
ScctTest
. Try: