- There are
post-integration-testphases for preparing and cleaning up integration tests.
Proposed features to implement (short term)
- A project should be allowed to have both unit tests and integration tests sitting next to each other.
- Directory structure:
- There's no need for introducing a third type of tests. Functional tests should be considered integration tests. If there's a need for more types of tests, it should be implemented by adding features to the surefire plugin to configure it in different
executionsbut the 2 phases to attach tests to will be
test(for unit tests) and
- Modify the surefire plugin to add a new
surefire:itgoal. See MSUREFIRE-50.
- Add new
<integrationTestSourceDirectory>to the POM model. See MNG-2009. Note: Does this need updating the minor version of the POM version?
- Add new phases for integration tests:
integration-test-compile. See MNG-2010
Open short-term questions
- Should it be
- Should the surefire plugin goal be
- Should we add a
- Do we add a new
integration-test)? (see MNG-2011)
Ideas for the future
- An alternative directory structure:
- Should we rename
src/testinto something more explicit like
src/test-unit? BTW the same question will arise for the lifecycle which is currently named
testeven though it's meant to be only for unit tests. Same for
Other issues/articles related to the testing strategy / testing best practices
- http://jira.codehaus.org/browse/MNG-1922: Rename maven-it-plugin plugin as its name implies it is for performing integration tests in general
- http://jira.codehaus.org/browse/MNG-1381: best practices: testing strategies