Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
<!-- skip unit test run, tests to be executed during integration-test -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
        <executions>
          <execution>
            <id>surefire-it</id>
            <phase>integration-test</phase>
            <goals>
              <goal>test</goal>
            </goals>
            <configuration>
              <skip>false</skip>
            </configuration>
          </execution>
        </executions>
      </plugin>

You can change the test directory to src/it in order to mark the difference with normal tests.

Code Block

<build>

<testSourceDirectory>src/it/java</testSourceDirectory>


<testResources>

<testResource>

<filtering>false</filtering>

<directory>src/it/resources</directory>

</testResource>

</testResources>

Note : You cannot have unit tests and integration tests in the same Maven project.