Specifically, for a Scalatra project, but the question probably applies to most.
For example, I typically want to run:
- unit tests
- code quality checks (coverage, duplication, complexity, jsLint!)
- integration tests (not too many!)
- acceptance tests (usually a "pre-checkin" subset)
- regression tests (basically the same as acceptance tests, but a bigger set)
- performance tests
I want to run different subsets of these by context - i.e. after a simple code change I might just run the first three; before checking in I might want to run a bigger set, and the Continuous Integration server might have a "fast" and a "slow" build that have even bigger sets.
The basic sbt docs seem to assume a single "test" target - is there a recommended way to implement multiple test phases like this?