jeudi 16 juillet 2015

How to run tests in a class sequentially in ScalaTest?

I have a class which extends org.scalatest.junit.JUnitSuite. This class has a couple of tests. I do not want these tests to run in parallel.

I know how simple it is with Specs2 (extend the class with Specification and add a single line sequential inside the class) as shown here: How to run specifications sequentially.

I do not want to alter the Build file by setting: parallelExecution in Test := false nor I want to use tags to run specific test files sequentially.

All I want is a way to make sure that all tests inside my class run sequentially. Is this possible with ScalaTest ? Any sample test/template is appreciated.

A quick google search pointed me to this: http://ift.tt/1M8m7x0

Just for the couple of tests I have, I think it is a total overkill to create StepSuites. I am not completely sure if that's the way to go about with my case!

Aucun commentaire:

Enregistrer un commentaire