Its always a good practice to have a fine test coverage in any project. I am working on Lift framework. I have tried to integrate the SCCT with my lift scala project.

Here, I am going to elaborate a few easy steps to integrate the SCCT in Lift Scala project. I am using scala 2.10.0 and sbt 0.12 version.

1. Add the following lines of code in your plugin.sbt file. You need to add the plugin dependency to your project’s plugins.sbt.

resolvers += Classpaths.typesafeResolver

resolvers += "scct-github-repository" at ""

addSbtPlugin("reaktor" % "sbt-scct" % "0.2-SNAPSHOT")

2. Add the following to build.sbt to add SCCT plugin settings:

seq(ScctPlugin.instrumentSettings: _*)

3. Now, set the path to your project on the terminal and run sbt. This will download the all SCCT dependencies.

4. That’s it. Lets run the SCCT with command scct:test

5. You’ll find the html file with name index.html which would give you the full test report. You’ll find this file in this path /target/scala-2.10/coverage-report/index.html.

6. Run this file on browser and get the test coverage details.

About the Author: Ruchi Agarwal

Experienced working in Scala/ Java as a Sr. Software Consultant at Knoldus Software LLP for around 4 years. Having good understanding of various technologies includes Play, AngularJS, MongoDB, LiftWeb, Akka, jQuery, Javascript, CSS etc. Certified in RAD (Rational Application Developer) for WebSphere Software and RFT (Rational Funtional Tester) for Java. Skilled professional focused on the basic business functions and creation of software. Having firm understanding of design methodology. Likes to work with responsibility, dedication and perseverance.

One comment

  1. Hi,
    1. I have added below dependencies to the plugin.sbt

    resolvers += Classpaths.typesafeResolver

    resolvers += “scct-github-repository” at “”

    addSbtPlugin(“reaktor” % “sbt-scct” % “0.2-SNAPSHOT”

    2. added seq(ScctPlugin.instrumentSettings: _*) this line in my Build.scala file

    3. after that i did; sbt clean compile

    4. now when i ran the scct:test or sbt clean scct:test

    getting the follwoing error: [info] Set current project to Pixie Workflow (in build file:/home/anji/project_dev/pixie/pixie-workflow/)
    [error] No such setting/task
    [error] scct:test
    [error] ^

    could please guid me, where I am doing mistake.

    I suspect step 2 not set properly, please guid me.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.