Tuesday, 9 February 2016

SCoverage: Scala Code Coverage Tool

SCoverage stands for Scala Code Coverage Tool

SCoverage is a open source code coverage tool for scala from Apache Foundation.

It's plugins are available for the following build tools

  • maven 
  • sbt
  • gradle

SBT SCoverage Plugin:

If we want to use this tool in our SBT-based scala project, please add the following line of code in our project's "plugins.sbt".



addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.3.0")


NOTE:-
plugins.sbt file is located in our project root folder.

Maven SCoverage Plugin:

If we want to use this tool in our Maven-based scala project,  add the following entry in your pom.xml file.


<dependency>

<groupId>org.scoverage</groupId>
<artifactId>maven-scoverage-plugin</artifactId>
<version>0.99.10</version>
</dependency>

NOTE:-
pom.xml file is located in our project root folder.

Gradle SCoverage Plugin:

If we want to use this tool in our Gradle-based scala project, add the following line in our project's build.gradle:


'org.scoverage:gradle-scoverage:2.0.1'

NOTE:-
build.gradle file is located in our project root folder.

Thank you for reading my post. If you like it, please drop me a comment to boost myself to write more and more good tutorials for you.