I use sbt and JUnit to run tests for a large Scala project. I am deploying several test JVMs and determining how tests should be grouped in the JVM using testGrouping in Test .
Tests run in parallel, but their output alternates, making reading difficult. I set logBuffered in Test := true , but that seems to do nothing.
Here is a snippet from my settings :
parallelExecution in Test := true, testForkedParallel in Test := false, concurrentRestrictions in Global := Seq(Tags.limit(Tags.ForkedTestGroup, 8)), testGrouping in Test := (definedTests in Test, javaOptions in Test) map groupBySuite, testGrouping in Test := { val original: Seq[Tests.Group] = (testGrouping in Test).value original.map { group => val forkOptions = ForkOptions( bootJars = Nil, javaHome = javaHome.value, connectInput = connectInput.value, outputStrategy = outputStrategy.value, runJVMOptions = (javaOptions in Test).value, workingDirectory = Some(baseDirectory.value), envVars = envVars.value ) group.copy(runPolicy = Tests.SubProcess(forkOptions)) } }, logBuffered in Test := true,
How can I keep my tests parallel, but somehow buffered and displayed in order to be readable? Could there be some kind of setting that I need to pass to outputStrategy in the JVM forked parameters?
There is a similar question here , but I want my tests to run in parallel.
source share