I wanted to add code coverage to help me spot additional tests to write. Jacoco4sbt came up in the Google searches as the most likely solution to use. After a first attempt which just didn’t look promising I eradicated Jacoco from my project. I decided to try again after a while and, hey presto, it worked!
The two vital ingredients were:
addSbtPlugin("de.johoop" % "jacoco4sbt" % "2.1.6")
to project/plugins.sbt and
to build.sbt plus I wanted jacoco to use my testing configuration file.
testOptions in jacoco.Config += Tests.Setup( () => System.setProperty("config.file", "conf/testing.conf") )
parallelExecution in jacoco.Config := false
to build.sbt as well, with the blank lines included like that.
Then I ran
When I saw the test debug log output in the application.log file I was most surprised and delighted.