I'm trying to support running tags/groups of tests on the Maven commandline. I think I have the correct syntax setup in my .scala file (see below), but I'm unsure how to actually execute on the commandline. Examples on the web are mostly in Java.
I want to be able to do something like mvn clean test -Dtags:SlowTest,DbTest
to run all the tests tagged as "slow" and "db".
I've seen Surefire pom.xml examples out there, but I'm not sure how I'd then tag the Surefire groups in my test code itself.
Ideas?
import org.junit.experimental.categories.Category
import org.scalatest.FunSuite
import org.junit.runner.RunWith
import org.scalatest.junit.JUnitRunner
import org.scalatest.Tag
class SlowTest extends Tag("com.mycompany.tags.SlowTest")
class DbTest extends Tag("com.mycompany.tags.DbTest")
@RunWith(classOf[JUnitRunner])
@Category(Array(classOf[SlowTest], classOf[DbTest]))
class FunSuiteTest extends FunSuite with DemoHelpers {
test("DemoTest1") {