Run test setup before all tests

I use ScalaTest to test a BDD application.

The function BeforeAndAfterAllallows you to run the installation before running tests in a specific function.

But I need to run the setup before running any of the tests.

What is the easiest way to achieve this?

+4
source share
1 answer

Mix the BeforeAndAfterAll property and implement beforeAll

… extends with BeforeAndAfterAll {

   override def beforeAll(configMap: Map[String, Any]) { // Set up code }

 }

ScalaDoc for BeforeAndAfterAll

+2
source

All Articles