Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 2.15
-
Component/s: Maven Surefire Plugin
-
Labels:None
-
Complexity:Intermediate
-
Number of attachments :
Description
In some cases it would be useful to have a set of tests that run with various dependency configurations. One way to accomplish this would be to have a single project that contains the unit tests and generates a test jar. Several test configuration projects could then consume the unit tests and run them with different dependency sets. The problem is that there is no easy way to run tests in a dependency jar. The surefire plugin should have a configuration to allow me to run all or a set of unit tests contained in a dependency jar.
Basically the description at http://maven.apache.org/guides/mini/guide-attached-tests.html gives you the procedure to create the test.jar. However, the plugin does not execute the tests from the JAR, rendering the whole thing rather useless.
One way to solve the issue would be to have the surefire plugin check all dependencies of type "test-jar" (or classifier "tests") for tests, too.
Another way would be to provide additional dependencies for the surefire-plugin in the plugin's configuration.