ParallelTestExecution with FlatSpec, Selenium DSL and Spring

I use Scalatest, FlatSpec, Spring, Selenium DSL and BeforeAndAfterAll. It seems that one of these functions has stopped working ParallelTestExecution. This is what happens when I run the class with two tests:

  • One browser opens and performs some actions in front of everything (but not Spring)
  • Another browser will open, and the beforeAll file
  • The second browser is used for the first test, then closes
  • Another browser opens and does it earlier. All materials followed by a second test
  • The first and third browser are closed.

So basically the test works exactly the same as without ParallelTestExecution, except that an additional window has opened?

+1
source share
1 answer

, . -, ParallelTestExecution OneInstancePerTest. , , concurrency Heisenbugs . , , ( ), . , , - , , , , . beforeAll afterAll -, .

, , , ParallelTestExecution , ScalaTest, . Runner, -P. , ParallelTestExecution (, run).

ParallelTestExecution , . . , ScalaTest "" , . , - (.. ParallelTestExecution). -P Runner sbt ScalaTest ..

, BeforeAndAfterAll , . , , , , BeforeAndAfterEach. , , ParallelTestExecution. , , Selenium, . , Selenium WebBrowser.

, , , ParallelTestExecution, BeforeAndAfterAll BeforeAndAfterEach ( withFixture) -P Runner (, ant Maven) sbt ScalaTest .

+10

All Articles