1

I have written a maven project . I am using junit and jmockit to write unit-test and for mocking.

I want to write Integration test for the same project.

What plugin should i use and what configuration i need to do .

Thanks.

avy
  • 417
  • 1
  • 9
  • 21

1 Answers1

5

You can do like this

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-surefire-plugin</artifactId>
  <configuration>
    <excludes>
      <exclude>**/*IntegrationTest.java</exclude>
    </excludes>
  </configuration>
  <executions>
    <execution>
      <id>integration-test</id>
      <goals>
        <goal>test</goal>
      </goals>
      <phase>integration-test</phase>
      <configuration>
        <excludes>
          <exclude>none</exclude>
        </excludes>
        <includes>
          <include>**/*IntegrationTest.java</include>
        </includes>
      </configuration>
    </execution>
  </executions>
</plugin>
Suresh A
  • 1,178
  • 2
  • 10
  • 21