Packages

p

mill.contrib

scoverage

package scoverage

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Type Members

  1. trait ScoverageModule extends Module with ScalaModule

    Adds targets to a mill.scalalib.ScalaModule to create test coverage reports.

    Adds targets to a mill.scalalib.ScalaModule to create test coverage reports.

    This module allows you to generate code coverage reports for Scala projects with Scoverage via the scoverage compiler plugin.

    To declare a module for which you want to generate coverage reports you can Extends the mill.contrib.scoverage.ScoverageModule trait when defining your Module. Additionally, you must define a submodule that extends the ScoverageTests trait that belongs to your instance of ScoverageModule.

    // You have to replace VERSION
    import $ivy.`com.lihaoyi::mill-contrib-buildinfo:VERSION`
    import mill.contrib.scoverage.ScoverageModule
    
    Object foo extends ScoverageModule  {
      def scalaVersion = "2.12.9"
      def scoverageVersion = "1.4.0"
    
      object test extends ScoverageTests {
        def ivyDeps = Agg(ivy"org.scalatest::scalatest:3.0.5")
        def testFrameworks = Seq("org.scalatest.tools.Framework")
      }
    }

    In addition to the normal tasks available to your Scala module, Scoverage Modules introduce a few new tasks and changes the behavior of an existing one.

    - mill foo.scoverage.compile # compiles your module with test instrumentation # (you don't have to run this manually, running the test task will force its invocation)

    - mill foo.test # tests your project and collects metrics on code coverage - mill foo.scoverage.htmlReport # uses the metrics collected by a previous test run to generate a coverage report in html format - mill foo.scoverage.xmlReport # uses the metrics collected by a previous test run to generate a coverage report in xml format

    The measurement data by default is available at out/foo/scoverage/dataDir/dest/, the html report is saved in out/foo/scoverage/htmlReport/dest/, and the xml report is saved in out/foo/scoverage/xmlReport/dest/.

  2. class ScoverageReportWorker extends AnyRef

Value Members

  1. object ScoverageReportWorker extends ExternalModule

Ungrouped