Maven surefire plugin skipAfterFailureCount configuration not working
Asked Answered
W

1

5

I wanna stop test execution when one of them failed. I tried skipAfterFailureCount config in pom xml and mvn -Dsurefire.skipAfterFailureCount=1 as a command line argument but still has no effect. Is there a clear way to do this ?

PART OF MY POM.XML:

<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-surefire-plugin</artifactId>
   <version>2.22.2</version>
   <configuration>
     <skipAfterFailureCount>1</skipAfterFailureCount>
   </configuration>
</plugin>

I'm using JUnit 5.6.2

Weichsel answered 7/7, 2020 at 9:52 Comment(0)
L
9

This feature is not yet supported for the JUnit5.

See the documentation https://maven.apache.org/surefire/maven-surefire-plugin/featurematrix.html

There is a feature request SUREFIRE-1698 and another one SUREFIRE-1710 which needs to be implemented in JUnitPlatformProvider. Feel free to contribute at the Github. You need to implement SPI for junit5's ExecutionCondition and maybe the TestWatcher.

Lindly answered 7/7, 2020 at 21:26 Comment(1)
Thanks for the responding, I know that a little bit late =)Crim

© 2022 - 2024 — McMap. All rights reserved.