you can specify a different includes rule for failsafe so that you
don't need to follow the IT convention.
the advantage of failsafe is that it will allow you to tidy up after
the integration tests if the tests have failed... surefire does not
give you that option, also you don't have to mess with overriding
sutefire's default execution and then cancelling the override back
(because they ate separate plugins (from the same code base))
Sent from my [rhymes with tryPod] ;-)
On 22 Jan 2010, at 20:27, Adam Retter <adam.ret...@googlemail.com>
wrote:
Yes that is an option, but I dont really like the idea of having to
prefix all my integration tests with "IT*.java" which is required by
the failsafe plugin.
Also surely the exclusions stuff should work? and I would need to use
them to exclude the IT tests which are used by the failsafe plugin
from the standard tests anyways?
2010/1/22 Stephen Connolly <stephen.alan.conno...@gmail.com>:
you'd probably have more luck using maven-failsafe-plugin to run your
integration tests and leave maven-surefire-plugin for running the
unit
tests... also it would not require quite so extreme hackyness
Sent from my [rhymes with tryPod] ;-)
On 22 Jan 2010, at 11:32, Adam Retter <adam.ret...@googlemail.com>
wrote:
My exclusions from my test configuration in my POM seem to be being
ignored. I am following the following example, to try and setup Unit
Tests and Integration Tests -
http://weblogs.java.net/blog/johnsmart/archive/2008/06/unit_tests_are.html
My POM looks like this -
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>uk.co.landmark.solutions</groupId>
<artifactId>SchemaShredder</artifactId>
<version>2.1</version>
<packaging>jar</packaging>
<name>SchemaShredder</name>
<url>http://maven.apache.org</url>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
<executions>
<execution>
<id>unit-tests</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<skip>false</skip>
<excludes>
<exclude>**/systest/**</exclude>
</excludes>
</configuration>
</execution>
<execution>
<id>integration-tests</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<skip>false</skip>
<includes>
<include>**/systest/**</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
...
</dependencies>
</project>
My project layout looks like this -
/SchemaShredder
/SchemaShredder/src
/SchemaShredder/src/uk/...
/SchemaShredder/test
/SchemaShredder/test/java
/SchemaShredder/test/java/uk/... (unit tests in here)
/SchemaShredder/test/java/systest/uk/... (integration-tests in
here)
/SchemaShredder/test/resources
For some reason I dont understand when I try and excluse the
integration tests (**/systest/**) from the test phase, it doesnt
exclude them and still tries to execute them.
Also if I change the exclusion to **.java I would expect no tests to
run, but again it seems to ignore the exclusion and run all the
tests
still. Help, what am I doing wrong?
Thanks Adam.
--
Adam Retter
skype :adam.retter
http://www.adamretter.org.uk
---
------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org
--
Adam Retter
skype :adam.retter
http://www.adamretter.org.uk
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org