Use javaOptions
sbt setting in Build.scala or build.sbt to pass jvm options to tests e.g.
- statically:
javaOptions in Test ++= Seq("-Dconfig.file=conf/staging.conf")
or
- dynamically (from command line)
javaOptions in Test ++=
collection.JavaConversions.propertiesAsScalaMap(System.getProperties)
.map{ case (key,value) => "-D" + key + "=" +value }.toSeq