Is it possible not to run some of the JUnit test cases by default at build time?
Goal:
We have two kinds of test cases:
- "Unit Tests"
- "Integration Tests" (tests the full path up to DB)
On build server, we do not want integration tests to be run (DB not available, etc.). However, unit tests should be run. Currently we achieve this by keeping the integration tests commented out in CM and enabled by developers as needbed.
This is a cumbersome arrangement. What we would like to have is as a default, tell maven to run only unit tests. One way this can be done I suppose is to keep integration tests in a separate package which is not part of default build. However, this will keep test target code and test cases physically separate and typically go out of sync over time.
Any good solutions?