How to disable test suite in ScalaTest

The easy way to do this in 1.8 is to add a constructor that takes a dummy argument. ScalaTest (and sbt) won’t discover the class if it doesn’t have a public, no-arg constructor:

class MySuite(ignore: String) extends FunSuite { 
  // ...
}

In 2.0 you’ll be able to just write @Ignore on the class:

@Ignore
class MySuite extends FunSuite {
  // ...
}

Leave a Comment