sbt-scoverage alternatives and similar packages
Based on the "Sbt plugins" category.
Alternatively, view sbt-scoverage alternatives based on common mentions on social networks and blogs.
coursier9.1 8.5 sbt-scoverage VS coursierPure Scala Artifact Fetching
sbt-native-packagersbt Native Packager
sbt-assembly8.9 2.8 sbt-scoverage VS sbt-assemblyDeploy über-JARs. Restart processes. (port of codahale/assembly-sbt)
sbt-dependency-graphsbt plugin to create a dependency graph for your project
sbteclipse7.8 8.8 sbt-scoverage VS sbteclipsePlugin for sbt to create Eclipse project definitions
sbt-jmh7.4 0.0 sbt-scoverage VS sbt-jmh"Trust no one, bench everything." - sbt plugin for JMH (Java Microbenchmark Harness)
sbt-release7.4 8.4 sbt-scoverage VS sbt-releaseA release plugin for sbt
sbt-revolver7.3 0.0 sbt-scoverage VS sbt-revolverAn SBT plugin for dangerously fast development turnaround in Scala
sbt-docker7.3 0.0 sbt-scoverage VS sbt-dockerCreate Docker images directly from sbt
sbt-updates7.1 8.1 sbt-scoverage VS sbt-updatessbt plugin that can check Maven and Ivy repositories for dependency updates
tut6.9 1.1 sbt-scoverage VS tutdoc/tutorial generator for scala
better-monadic-forDesugaring scala `for` without implicit `withFilter`s
sbt-buildinfo6.8 0.0 sbt-scoverage VS sbt-buildinfoI know this because build.sbt knows this.
xsbt-web-plugin6.3 5.0 sbt-scoverage VS xsbt-web-pluginServlet support for sbt
sbt-pack6.3 9.1 sbt-scoverage VS sbt-packA sbt plugin for creating distributable Scala packages.
sbt-microsites6.2 5.3 sbt-scoverage VS sbt-micrositesAn sbt plugin to create awesome microsites for your project
sbt-mima-plugin6.2 6.9 sbt-scoverage VS sbt-mima-pluginA tool for catching binary incompatibility in Scala
sbt-ensime6.1 0.0 sbt-scoverage VS sbt-ensimeGenerates .ensime config files for SBT projects http://ensime.org/build_tools/sbt
mdoc6.0 9.3 sbt-scoverage VS mdocTypechecked markdown documentation for Scala
splain5.7 5.3 sbt-scoverage VS splainbetter implicit errors for scala
sbt-sonatype5.7 8.9 sbt-scoverage VS sbt-sonatypeA sbt plugin for publishing Scala/Java projects to the Maven central.
scala-clippy5.5 0.0 sbt-scoverage VS scala-clippyGood advice for Scala compiler errors
sbt-ci-release5.4 0.0 sbt-scoverage VS sbt-ci-releasesbt plugin to automate Sonatype releases from GitHub Actions
sbt-site5.3 8.0 sbt-scoverage VS sbt-siteSite generation for sbt
sbt-dependency-checkSBT Plugin for OWASP DependencyCheck. Monitor your dependencies and report if there are any publicly known vulnerabilities (e.g. CVEs). :rainbow:
sbt-header5.0 6.7 sbt-scoverage VS sbt-headersbt-header is an sbt plugin for creating file headers, e.g. copyright headers
sbt-doctest4.6 9.0 sbt-scoverage VS sbt-doctestDoctest for scala
sbt-pgp4.5 0.0 sbt-scoverage VS sbt-pgpPGP plugin for sbt
sbt-play-scalajsSBT plugin to use Scala.js along with any sbt-web server.
sbt-scalafmt4.3 4.3 sbt-scoverage VS sbt-scalafmtsbt plugin for Scalafmt
sbt-unidoc4.1 5.7 sbt-scoverage VS sbt-unidocsbt plugin to create a unified Scaladoc or Javadoc API document across multiple subprojects.
sbt-api-mappingsAn Sbt plugin that fills apiMappings for common Scala libraries.
sbt-sublime3.9 0.0 sbt-scoverage VS sbt-sublimeAn sbt plugin for generating Sublime Text projects with library dependencies sources
sbt-robovm3.8 0.0 sbt-scoverage VS sbt-robovmAn sbt plugin for iOS development in Scala
sbt-groll3.6 0.0 sbt-scoverage VS sbt-grollsbt plugin to roll the Git history
sbt pom reader pluginTranslates xml -> awesome. Maven-ish support for sbt.
sbt-ghpages3.4 4.0 sbt-scoverage VS sbt-ghpagesgit, site and ghpages support for sbt projects.
ScalaKata23.3 0.0 sbt-scoverage VS ScalaKata2Interactive Playground
sbt-ide-settingsSBT plugin for tweaking various IDE settings
sbt-example2.7 9.2 sbt-scoverage VS sbt-exampleRun Scaladoc as unit tests
sbt-scala-js-mapA Sbt plugin that configures source mapping for Scala.js projects hosted on Github
sbt-haxe1.9 0.0 sbt-scoverage VS sbt-haxeA Sbt plugin to compile Haxe sources.
sbt-versions1.4 0.0 sbt-scoverage VS sbt-versionsPlugin that checks for updated versions of your project's dependencies.
sbt-hepek1.3 0.0 sbt-scoverage VS sbt-hepekSbt plugin for rendering Scala objects to files. And more!
sbt-pantarhei1.2 0.0 sbt-scoverage VS sbt-pantarheisbt plugin building and publishing release notes from github pull requests
sbt-cppp1.2 0.0 sbt-scoverage VS sbt-cpppCross-Project Protobuf Plugin for Sbt
sbt-view1.0 0.0 sbt-scoverage VS sbt-viewSBT Plugin for Viewing ScalaDoc and JavaDoc
pttrt0.8 0.0 sbt-scoverage VS pttrtPass Them To Run-Time
sbt-classfinder0.7 0.0 sbt-scoverage VS sbt-classfinderSBT plugin for retrieving runtime information about the classes and traits in a project
Access the most powerful time series database as a service
Do you think we are missing an alternative of sbt-scoverage or a related project?
sbt-scoverage is an sbt plugin that offers support for Scala code coverage using scoverage. This plugin supports Scala 2.12, 2.13, and 3.
NOTE: that ScalaJS and Scala Native support is limited to Scala 2. NOTE: that Scala 3 support starts with 3.2.x.
Requirements: Requires sbt 1.2.8 or above
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "x.x.x")
If you are in an enterprise environment, and the above does not work, try:
libraryDependencies += "org.scoverage" % "sbt-scoverage_2.12_1.0" % "x.x.x"
Run the tests with enabled coverage:
$ sbt clean coverage test
or if you have integration tests as well
$ sbt clean coverage it:test
To enable coverage directly in your build, use:
coverageEnabled := true
To generate the coverage reports run
$ sbt coverageReport
Coverage reports will be in your
directory. There are HTML and XML reports. The XML is useful if you need to
programatically use the results, or if you're writing a tool.
NOTE: If you're running the coverage reports from within an sbt console
session (as opposed to one command per sbt launch), then the
is sticky. To turn it back off when you're done running reports, use the
coverageOff command or reset
set coverageEnabled :=
Multi project reports
By default, scoverage will generate reports for each project separately. You can merge them into an aggregated report by using the following:
$ sbt coverageAggregate
NOTE: You do not need to run
aggregates over the sub-projects' coverage data directly, not the report xml.
Exclude classes and packages and files
You can exclude classes from being considered for coverage measurement by providing semicolon-separated list of regular expressions.
coverageExcludedPackages := "<empty>;Reverse.*;.*AuthService.*;models\\.data\\..*"
The regular expressions are matched against the fully qualified class name, and must match the entire string to take effect. Any matched classes will not be instrumented or included in the coverage report.
You can also exclude files and file paths.
coverageExcludedFiles := ".*\\/two\\/GoodCoverage;.*\\/three\\/.*"
.scala file extension needs to be omitted from the filename, if one is given.
Note: These two options only work for Scala2. Right now Scala3 does not support a way to exclude packages or files from being instrumented.
You can also mark sections of code with comments like:
// $COVERAGE-OFF$Disabling highlighting by default until a workaround for https://issues.scala-lang.org/browse/SI-8596 is found ... // $COVERAGE-ON$
Any code between two such comments will not be instrumented or included in the coverage report.
Based on minimum coverage, you can fail the build with the following keys:
coverageFailOnMinimum := true coverageMinimumStmtTotal := 90 coverageMinimumBranchTotal := 90 coverageMinimumStmtPerPackage := 90 coverageMinimumBranchPerPackage := 85 coverageMinimumStmtPerFile := 85 coverageMinimumBranchPerFile := 80
These settings will be enforced when the reports are generated. If you generate
an aggregate report using
coverageAggregate then these settings will apply to
Override Location for Coverage Data And Report
If desired, one could override the default location for generating the sbt report and data through setting
Example in data-dir test:
coverageDataDir := target.value / "custom-test"
Can also be set through the sbt set directive
set coverageDataDir := file("/tmp")
Trouble-shooting failing tests
scoverage does a lot of file writing behind the scenes in order to track which statements have been executed. If you are running into a scenario where your tests normally pass, but fail when scoverage is enabled, then the culprit can be one of the following:
- timing issues on futures and other async operations, try upping the timeouts by an order of magnitude.
- tests are run in a sandbox mode (such as with
java.security.PrivilegedAction<T>), try running the tests outside of the sandbox.
the scoverage samples project.
Codacy integrates with your favorite coverage tool to provide an in-depth overlook of your project status. scoverage information can be integrated into Codacy through the codacy-coverage-reporter.
If you have an open source project then you can add code coverage metrics with the Coveralls. scoverage will integrate with coveralls using the sbt-coveralls plugin.
You can integrate with Codecov easily sending your reports there via your CI. You can see an example of this here in codecov/example-scala.
Plugin for SonarQube
If you want to visually browse statement coverage reports then use this plugin for SonarQube. It allows you to review overall project statement coverage as well as dig deeper into sub-modules, directories and source code files to see uncovered statements. Statement coverage measurement can become an integral part of your team's continuous integration process and a required quality standard.
For any information on releases and upgrading, please refer to the release page.
*Note that all licence references and agreements mentioned in the sbt-scoverage README section above are relevant to that project's source code only.