Reputation: 21
here is my pom file portion where I used the false property to disable all assertions in the tests. But it is still checking all assertion violations
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M4</version>
<configuration>
<enableAssertions>false</enableAssertions>
<includes>
<include>**/*Test.java</include>
</includes>
<excludes>
<exclude>**/JavaBeanNavigatorTest.java</exclude>
<exclude>**/JDOMNavigatorTest.java</exclude>
<exclude>**/XOMNavigatorTest.java</exclude>
<exclude>**/*Tests.java</exclude>
</excludes>
</configuration>
</plugin>
Upvotes: 0
Views: 459
Reputation: 9482
The enableAssertions
setting controls Java assert
statements, not JUnit assertions.
There's not a straightforward way to skip running JUnit assertions. You can use the testFailureIgnore
configuration to avoid failing the build due to test failures.
Upvotes: 1