Using tags in ScalaTest
Hi, trying to run a set of unit tests only in the idea.
Have tagged a test with
object UnitTest extends Tag("com.mycompany.tags.UnitTest")
test("stimulate coverage of generated methods on case classes", UnitTest) {
....
}
and attempt to run a scalatest config with test options of
-n UnitTest
and run all in project.
But it runs all the tests it finds.
Is it possible to scope the tests that run by the tag ??
Thanks
Please sign in to leave a comment.
Actually does appear to be partially working.
The suites are displayed even though no tests from them run, hence the confusion.
2 points.
1) Each suite is run twice when choosing the top tevel package and searching across the whoel project.
2) For some reason one suite is being executed incorrectly without the tag, trying to identify why.
Thanks
I believe the incorrect execution is due to extending from org.scalatest.OneInstancePerTest
If these two issues were overcome I would have a way of running specific tags in the ide to say just run all unit tests or all performance tests across our multi module project
Hi guys, any comment on the issue of running everything twice ?
Can workaround everything else.
Should add this appears when using 'All In Package', the command generated that can be seen in the run console lists each test suite twice.
Thanks
PS. Tried the update for dupes in Specs2 fix that you did the other day and using 0.5.625 but same issue.
It's fixed for ScalaTest too now: http://youtrack.jetbrains.com/issue/SCL-3687
Best regards,
Alexander Podkhalyuzin.