In our current projects we have separate Maven modules for integration tests and for component tests. Futhermore all our component tests must end with CT and all integration tests must end with IT. We also ensure that all tests (unit tests, integration tests, component tests) will be always compiled.

Unit tests are executed by default. Starting Maven with -P IT executes only integration tests but no unit tests and no component tests. The same principle applies for component tests and unit tests.

It took us some time the came up with this solution. But the advantage is that we can run unit tests, component tests and itegration tests on our CI server parallel.

Oliver

Am 24.06.16 um 10:58 schrieb zuxiong lin:
Hi. maven devs.
According to
http://maven.apache.org/surefire/maven-failsafe-plugin/examples/inclusion-exclusion.html
, the Failsafe Plugin will automatically identify the wildcard patterns :
"**/IT*.java" .. "**/*IT.java"


But how do I separate UTs and ITs directory with
https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html
?

+Project

+src/it/java

ITEcho.java

+src/test/java

EchoTest.java

+src/test/resources
+src/it/resources




--
N Oliver B. Fischer
A Schönhauser Allee 64, 10437 Berlin, Deutschland/Germany
P +49 30 44793251
M +49 178 7903538
E [email protected]
S oliver.b.fischer
J [email protected]
X http://xing.to/obf


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to