2

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?

thomson_matt
  • 7,473
  • 3
  • 39
  • 47
  • Looking at [ScctPlugin](https://github.com/mtkopone/sbt-scct/blob/f92fc39a5f243591504dd0e6d6a736239f909ad4/src/main/scala/ScctPlugin.scala) `scct:test` runs test in a custom configuration called `ScctTest`, but it's missing the support for the integration tests. You'd need to create something like `ScctIntegrationTest` and set up all the settings for it. Probably better off asking the authors to add the feature to sbt-scct. – Eugene Yokota Aug 22 '13 at 14:49
  • SCCT is obsolete. https://github.com/scoverage/sbt-scoverage is what you want now. – sksamuel Nov 28 '14 at 11:03

1 Answers1

0

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