Reputation: 2961
I want to be able to count all the scala tests in a directory or its sub-directory.
I'm using org.scalatest. Can anyone suggest a fast way to do this? Either from the test source, or from test output?
Upvotes: 4
Views: 366
Reputation: 2829
According to the Scalatest main page, the number of tests should be output when running the tests on the command line:
$ scala -cp scalatest_2.9.0-2.0.M3.jar org.scalatest.run StackSpec
Run starting. Expected test count is: 2
StackSpec:
A Stack
- should pop values in last-in-first-out order
- should throw NoSuchElementException if an empty stack is popped
Run completed in 96 milliseconds.
Total number of tests run: 2
Upvotes: 4