Monday 8 August 2011

SBT/ScalaTest: Running individual tests through the use of tagging

In a given suite of tests, one test can be tagged like so:


And to run only the specified test from within in SBT:

1 comment:

Berkeley said...

I've been having trouble with this. I've tagged some of my tests (with e.g. "Slow") and I'm trying to get sbt to not run them. Looking at your post and some others, it looks like

sbt test -- -l Slow

should do the job fine. But instead, sbt complains about not understanding "-l". Replacing test with test-only and a specific test doesn't change anything. I'm wondering if (if you know) this behavior changed with the current version of sbt or scalatest? Or am I just doing something wrong?