I'm trying to get Jacoco4sbt running with Play Framework 2.2.1. I can get the tests to run with Jacoco, but they fail because they don't run with my alternate config. i.e.:
val main = play.Project(appName, appVersion, appDependencies, settings = jacoco_settings)
.settings(
javaOptions in Test += "-Dconfig.file=conf/application.test.conf"
, parallelExecution in jacoco.Config := false
)
As the Jacoco4sbt documentation clearly states from their wiki:
One caveat though: As you may have noticed, this plugin works in its own configuration, which is based on the test configuration. So, any settings you would normally define in the test configuration, you have to also define in the jacoco configuration for the plugin to work as expected.
Source: https://github.com/sbt/jacoco4sbt/wiki
So then the question is how do I pass the -Dconfig.file= JVM arg into Jacoco to run? Without it ultimately my tests wont run properly as I'm using the test config file to load a different global class and db connection.