The failsave integration tests do not run. They should be applied to the whole service (war). But they are defined within a module (myproject-api-impl) and are therefore skipped. I could not figure out how to configure this.

Martin


Am 13.03.2015 um 09:00 schrieb Hervé BOUTEMY:
sorry, can't understand the case: problem when building the archetype? with
project generated from archetype?

Regards,

Hervé

Le vendredi 13 mars 2015 08:54:06 Martin Gütlein a écrit :
Anyone?
Where could I get some help on this issue (already tried stackoverflow
as well)?

Martin

Am 10.03.2015 um 19:59 schrieb Martin Gütlein:
Hi,

I would like to run integration tests on my project, performing and
testing rest-calls to my server.

I have a maven project layout like with modules:
MyProject-api
MyProject-api-impl
MyProject-webapp
MyProject-webapp-exec
MyProject-webapp-it
(see https://tomcat.apache.org/maven-plugin-2.0-beta-1/archetype.html)

The IT tests are defined in
MyProject-api-impl/src/test/java/.../..IT.java This may be part of the
problem, because they should be applied not only to the
project-api-impl, but to the entire project. How can I specify this?

Kind regards,
Martin

I'll post parts of my pom.xml at the end of this mail. When I run "mvn
verify" the output looks like this:

$ mvn clean verify
[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] MyProject
[INFO] MyProject-api
[INFO] MyProject-api-impl
[INFO] MyProject-webapp
[INFO] MyProject-webapp-exec
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Building MyProject 0.2
[INFO]
------------------------------------------------------------------------
[INFO]
...
[INFO]
[INFO] --- tomcat7-maven-plugin:2.0:run-war-only (tomcat7-run) @
MyProject ---
[INFO] Skipping non-war project
[INFO]
[INFO] --- maven-failsafe-plugin:2.12.4:integration-test (default) @
MyProject ---
[INFO] No tests to run.
[INFO]
[INFO] --- tomcat7-maven-plugin:2.0:shutdown (tomcat7-shutdown) @
MyProject ---
[INFO]
[INFO] --- maven-failsafe-plugin:2.12.4:verify (default) @ MyProject ---
[INFO] No tests to run.
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Building MyProject-api 0.2
[INFO]
------------------------------------------------------------------------
[INFO]
....
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Building MyProject-api-impl 0.2
[INFO]
------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @
MyProject-api-impl ---
[INFO] Deleting
/home/martin/workspace/myproject/MyProject-api-impl/target
[INFO]
[INFO] --- maven-enforcer-plugin:1.0.1:enforce (enforce-java) @
MyProject-api-impl ---
[INFO]
[INFO] --- maven-resources-plugin:2.3:resources (default-resources) @
MyProject-api-impl ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory
/home/martin/workspace/myproject/MyProject-api-impl/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @
MyProject-api-impl ---
[INFO] Compiling 280 source files to
/home/martin/workspace/myproject/MyProject-api-impl/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.3:testResources
(default-testResources) @ MyProject-api-impl ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory
/home/martin/workspace/myproject/MyProject-api-impl/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile
(default-testCompile) @ MyProject-api-impl ---
[INFO] Compiling 4 source files to
/home/martin/workspace/myproject/MyProject-api-impl/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.12.3:test (default-test) @
MyProject-api-impl ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:2.2:jar (default-jar) @ MyProject-api-impl
---
[INFO] Building jar:
/home/martin/workspace/myproject/MyProject-api-impl/target/MyProject-api-i
mpl-0.2.jar [INFO]
[INFO] --- tomcat7-maven-plugin:2.0:run-war-only (tomcat7-run) @
MyProject-api-impl ---
[INFO] Skipping non-war project
[INFO]
[INFO] --- maven-failsafe-plugin:2.12.4:integration-test (default) @
MyProject-api-impl ---
[INFO] Failsafe report directory:
/home/martin/workspace/myproject/MyProject-api-impl/target/failsafe-report
s

-------------------------------------------------------

  T E S T S

-------------------------------------------------------
Running org.kramerlab.myproject.api.impl.services.CompoundIT
anonymous > GET to http://localhost:8080
failed, please start services first!






Parts of my pom.xml in the root project folder:

<build>

     <pluginManagement>
<plugins> ... <plugin> <groupId>org.apache.tomcat.maven</groupId>

<artifactId>tomcat7-maven-plugin</artifactId>

           <version>2.0</version>
           <executions>
<execution> <id>tomcat7-run</id>
               <goals>
<goal>run-war-only</goal> </goals>
               <phase>pre-integration-test</phase>
               <configuration>
<fork>true</fork> </configuration> </execution>
             <execution>
<id>tomcat7-shutdown</id>
               <goals>
<goal>shutdown</goal> </goals>
               <phase>post-integration-test</phase>
</execution> </executions> </plugin> <groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-failsafe-plugin</artifactId>

           <version>2.12.4</version>
           <executions>
<execution> <goals> <goal>integration-test</goal>
                 <goal>verify</goal>
</goals> </execution> </executions> </plugin> </plugins> </pluginManagement>
     <plugins>
...
       <plugin>
<groupId>org.apache.tomcat.maven</groupId>
         <artifactId>tomcat7-maven-plugin</artifactId>
</plugin>
       <plugin>
<groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>
</plugin> </plugins> </build>
---------------------------------------------------------------------
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



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

Reply via email to