Question

I'm using ScalaTest for BDD testing of an app.

The BeforeAndAfterAll trait lets me run setup before a running the tests in a specific feature.

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

What is the simplest way to achieve this?

Was it helpful?

Solution

Mixin the BeforeAndAfterAll trait and implement beforeAll

… extends with BeforeAndAfterAll {

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

 }

ScalaDoc for BeforeAndAfterAll

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top