Last active
March 11, 2017 19:03
-
-
Save mrts/1b749909164af0d3347980822f49645c to your computer and use it in GitHub Desktop.
Separate source locations for unit and integration tests in Maven pom.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>build-helper-maven-plugin</artifactId> | |
<version>1.12</version> | |
<executions> | |
<execution> | |
<id>add-integration-test-sources</id> | |
<phase>generate-test-sources</phase> | |
<goals> | |
<goal>add-test-source</goal> | |
</goals> | |
<configuration> | |
<sources> | |
<source>src/it/java</source> | |
</sources> | |
</configuration> | |
</execution> | |
</executions> | |
</plugin> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-surefire-plugin</artifactId> | |
<version>2.19.1</version> | |
<configuration> | |
<excludes> | |
<exclude>**/*IntegrationTest.java</exclude> | |
</excludes> | |
</configuration> | |
</plugin> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-failsafe-plugin</artifactId> | |
<version>2.19.1</version> | |
<executions> | |
<execution> | |
<goals> | |
<goal>integration-test</goal> | |
</goals> | |
</execution> | |
</executions> | |
<configuration> | |
<includes> | |
<include>**/*IntegrationTest.java</include> | |
</includes> | |
</configuration> | |
</plugin> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See https://vaadin.com/docs/-/part/testbench/testbench-tutorial.html how to start and stop Jetty automatically during integration test run.