How to skip some unit tests during build

In some cases, I want to skip some junit tests several times during the build in Atlassian Bamboo. Is it possible? How to skip some junit tests during build?

Do you have any other suggestion?

Atlassian Bamboo Version 5.3

+3
source share
3 answers

Is this always the same test suite you want to skip? If so, you can control this through the maven profile and use the include / exclude parameter of the configuration option only to accomplish what you want

0
source

add the @Ignore annotation to the test you want to skip

0

You can configure this in your pom.xml with the surefire plugin. For example, the following will skip any test with "IT".

  <plugin>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.16</version>
    <inherited>true</inherited>
    <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>**/*IT.java</exclude>
          </excludes>
        </configuration>
      </execution>
    </executions>
  </plugin>
0
source

All Articles