Code coverage for Scala integration tests with SCCT

486 views Asked by At

I'm running integration tests in Scala - these are found in the src/it/scala directory, and I've added the following to my build.sbt:

seq(Defaults.itSettings: _*)

However, when I run SCCT to calculate code coverage, the integration tests are not run. How can I make them be run?

1

There are 1 answers

0
user3045663 On

I am using scct 0.3-SNAPSHOT / sbt 0.13

for mergin test + it:test try the following setting:

ScctPlugin.instrumentSettings ++ Defaults.itSettings ++ Seq(
  resourceDirectory in ScctPlugin.ScctTest <<= (resourceDirectory in Test),
  sources in ScctPlugin.ScctTest ++= (sources in IntegrationTest).value
)

this might get tricky if you have different resources