Build.sbt
Defaults.itSettings
sourceDirectory in IntegrationTest := baseDirectory.value / "test-integration"
libraryDependencies +=
"com.typesafe.play" %% "play-test" % play.core.PlayVersion.current % "it" //makes this available to integration tests
parallelExecution in IntegrationTest := false //Singleton Mongo Client not thread-safe for parallel tests. NullPointer being thrown because 1 test closed the connection while the other test needed it
lazy val root = (project in file("."))
.configs(IntegrationTest)
Add "it" to any dependencies that specify "test" i.e
val scalaTest = "org.scalatest" %% "scalatest" % scalaTestVersion % "it,test"