Eli Golin
Eli Golin

Reputation: 393

Creating nested suites in scalatest

I need to be able executing the following command in sbt: sbt myproject/it:test
but to make sure that only

class Combiner extends Suites(new TestSuite1,new TestSuite2,new TestSuite3)

will be executed instead of Combiner + TestSuite1 + TestSuite2 + TestSuite3 all being executed.
Now I'm aware of the fact that I can provide a specific class to execute in sbt - this is not what I want since I do not want other team members to remember running special sbt commands in one specific project.

Upvotes: 5

Views: 1836

Answers (1)

Eli Golin
Eli Golin

Reputation: 393

Apparently if you use the @DoNotDiscover annotation on the individual suites (TestSuite1,TestSuite2 etc..) they are not discovered automatically by the framework
but if they're explicitly mentioned as part of the "Combiner",
then they are being discovered.

Upvotes: 4

Related Questions