Child pages
  • ScalaTest Support
Skip to end of metadata
Go to start of metadata

Scala plugin lets you use ScalaTest testing tool, available for download at ScalaTest for Scala 2.7


If you are using Scala 2.8 compiler, then you need to get a more fresh version of ScalaTest: ScalaTest for Scala 2.8


Be careful with selecting a ScalaTest release: there are two different versions of ScalaTest for Scala 2.8; which of them to choose depends on compiler build date you are using.

When you add a ScalaTest library to your project, write an implementation of org.scalatest.Suite class, and then you will be able to run by just pressing Ctrl+Shift+F10:

After running this class you'll get following tree (actual view depends on your real test results, of course):

If you have more than one test in a package, you can run them all by right-clicking package and selecting Run Tests in menu item.

Things like VM options can be configured in the Run Configuration settings:

  • No labels


  1. Anonymous

    If I specify the <default> package, it also picks up the JUnit3Suite, which causes a failure.

  2. Hi,

    i am getting scalatest issue with the below dependencies.


    name := "ripple_dev"

    version := "0.1"

    scalaVersion := "2.11.8"

    assemblyJarName in assembly := "ripple_v1.jar"

    libraryDependencies ++= Seq(
    "org.apache.spark" %% "spark-core" % "2.4.0" % "provided",
     "org.apache.spark" %% "spark-sql" % "2.4.0" % "provided",
     "org.apache.spark" %% "spark-avro" % "2.4.0" % "provided" ,
     "org.mongodb" % "mongo-java-driver" % "3.9.1",
     "org.mongodb.spark" %% "mongo-spark-connector" % "2.4.0",
     //"scalactic" %% "scalactic" % "3.0.0",
    //"scalatest" %% "scalatest" % "3.0.0",
     "com.typesafe" % "config" % "1.2.1"
     // "" % "ojdbc6" % ""


    resolvers += "Artima Maven Repository" at ""
    resolvers += Resolver.bintrayIvyRepo("com.eed3si9n", "sbt-plugins")
    resolvers ++= Seq(
    "Artifactory" at "",
     "Snapshot" at "",
     "SBT Cache" at "",
     "ISG Artifactory" at "" ,
     "pegdown library" at ""

    parallelExecution in Test := false
    testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest, "-l", "org.scalatest.tags.Slow", "-u","target/test-reports", "-oD", "-eS")