A new fork of SCCT has been released as Scoverage
- Scoverage provides statement level coverage whereas SCCT provides line level coverage
Available on sonatype oss and maven central repository.
Join the SCCT google group for help, bug reports, feature requests, and general discussion on SCCT.
0.3.0 is built against Scala 2.10, 2.11
0.2.2 is built against Scala 2.9.2
addSbtPlugin("com.sqality.scct" % "sbt-scct" % "0.3")
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
addSbtPlugin("com.sqality.scct" % "sbt-scct" % "0.3.1-SNAPSHOT")
ScctPlugin.instrumentSettings
$ sbt clean scct:test
Then open:
./target/scala-2.10/coverage-report/index.html
Add the plugin instrumentation settings to child projects and the report
merging settings to the parent project.
For example project/MyBuild.scala:
object MyBuild extends Build {
lazy val root = Project(id = "parent", base = file("."))
settings (ScctPlugin.mergeReportSettings: _*) aggregate(first, second)
lazy val firstChild = Project(id = "firstchild", base = file("first"))
settings (ScctPlugin.instrumentSettings: _*)
lazy val secondChild = Project(id = "secondchild", base = file("second"))
settings (ScctPlugin.instrumentSettings: _*)
}
Run coverage for all child projects with:
$ sbt clean scct:test
This creates individual coverage reports into
$childProjectDir/target/scala*/coverage-report/
Merge all the existing child reports into
$parentProjectDir/target/scala*/coverage-report/ with:
$ sbt scct-merge-report
This software is licensed under the Apache 2 license, quoted below.
Copyright 2013 SCCT(http://sqality.com).
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.