Testing Strategies

Currently, Maven only supports unit testing out of the box. What we want is something flexible enough to work without having to make test definitions arbitrary.

Types of Tests

Unit Tests

Integration Tests

Acceptance Tests

Use cases

separate project is ideal, but

While a separate project might be something we recommend, I think we need to support them within the same project.

Design

Plugin integration tests

This means running a separate instance of Maven to do it effectively, so should always be separate projects utilising the built archive without requiring it be installed (bound to the integration test phase).

(question) How can we ensure the integration test of the subproject is run before installation of the parent?
(info) Perhaps it is better to have a plugin integration testing plugin that actually runs from the parent and execs maven on the subproject.

Report integration tests

This should be done in an identical fashion to a plugin integration test, but using htmlunit to test the output. This means having junit test cases.

Junit Integration Tests

We have an issue here in that we would have to recofigure the whole plugin, essentially needing to know its information. Can we preconfigure it, like we do with the forked lifecycles? Or is it best to just wire this one in by default to the integration testing parts of the lifecycle and use a different mojo (surefire:itest, compiler:itestCompile)?

TODO

Cactus Plugin

TODO

Junit Acceptance Tests

These would be set up in the same way as the junit integration tests except for the time at which they are run. The main difference may be that the default configuration would be to change the required acceptance to pass. It may be better to have a different plugin for these in general, but the default would also be surefire like above.

Reapplying junit report/clover to other test sets

TODO

Resources