0

I know i can tag a test using the taggedAs method (I'm using FlatSpec right now) like this:

                         \/\/\/\/\/\/\/\/\/
it should "not deadlock" taggedAs SlowTest in {
  Par.run(Executors.newFixedThreadPool(2))(Par.parMap(List.range(1, 100000))(math.sqrt(_)))
}

But I'd like to know whether i can tag a lot of tests all at once

something like:

taggedAs (SlowTest) { // yes this doesn't work, I've tried it.
  //a bunch-o-tests
}
coderatchet
  • 8,120
  • 17
  • 69
  • 125

1 Answers1

1

I don't think you can do this, as per the FlatSpec's nature:

We recommend FlatSpec as the default choice, because it is flat (unnested) like the XUnit tests familiar to most developers, but guides you into writing focused tests with descriptive, specification-style names.

If you use a different ScalaTest flavour which allows you to group tests, then I'm assuming you'll be able to tag them all at once, tagging the group. Haven't checked this though.

MacLuq
  • 141
  • 3
  • 6