Re: How do I separate UTs and ITs directory?

2016-06-24 Thread Oliver B. Fischer
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 o.b.fisc...@swe-blog.net
S oliver.b.fischer
J oliver.b.fisc...@jabber.org
X http://xing.to/obf


-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: How do I separate UTs and ITs directory?

2016-06-24 Thread John Patrick
I've also used the separate module for integration tests before.

I've also used junit categories and testng groups before.

Some places I've worked prefer seperate modules over categories/groups.

Usually I put selenium or cucumber tests in separate modules and also have
groups groups as well.

John


On 24 June 2016 at 17:02, Karl Heinz Marbaise  wrote:

> Hi,
>
> On 6/24/16 10:58 AM, zuxiong lin wrote:
>
>> 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
>>
>
> If you take a look into the default layout there is stated:
>
> Integration Tests (primarily for plugins)
>
>
> If you need integration tests it's best having a complete different module
> which contains the IT's...
> See also
> http://stackoverflow.com/questions/37998040/where-should-the-integration-tests-be-stored-when-using-the-maven-failsafe-plugi
>
> Kind regards
> Karl Heinz Marbaise
>
> -
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>


Re: How do I separate UTs and ITs directory?

2016-06-24 Thread Karl Heinz Marbaise

Hi,

On 6/24/16 10:58 AM, zuxiong lin wrote:

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


If you take a look into the default layout there is stated:

Integration Tests (primarily for plugins)


If you need integration tests it's best having a complete different 
module which contains the IT's...
See also 
http://stackoverflow.com/questions/37998040/where-should-the-integration-tests-be-stored-when-using-the-maven-failsafe-plugi


Kind regards
Karl Heinz Marbaise

-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



How do I separate UTs and ITs directory?

2016-06-24 Thread 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



-- 
林足雄

有赞--技术架构师
www.youzan.com

QQ: *534439207 */ fjjiaboming
Mobile: *18688162114*
Weibo:   fjjiaboming