I'm working on a scala project which use Maven to build and maven-surefire-plugin
to run the tests written in scalatest.
The tests are like:
import org.scalatest.ParallelTestExecution
@RunWith(classOf[org.scalatest.junit.JUnitRunner])
class MyTest extends FunSuite with ParallelTestExecution {
// some tests
}
From some questions, I know that if we give a -P
argument to scalatest, it will run the tests in parallel.
But I'm not sure how to configure it with maven-surefire-plugin
, I tried to add -P
, but which causes the JVM unable to start:
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-P</argLine>
</configuration>
</plugin>
Is there any way to do it? If we can't do it with maven surefire plugin, is it possible to configure it just in tests?