[ https://issues.apache.org/jira/browse/SUREFIRE-1698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17683404#comment-17683404 ]
Björn Kautler commented on SUREFIRE-1698: ----------------------------------------- [~tibordigana] {quote}In our documentation we mention only JUnit4.7+ and not JUnit5. {quote} Actually the docs at https://maven.apache.org/surefire/maven-surefire-plugin/examples/skip-after-failure.html say (and also said in the past) {quote}JUnit 4.0 or higher, {quote} and {quote}Preferably use JUnit 4.12 or higher version which fixed thread safety issues. {quote} which both imho includes JUnit 5, so maybe the docs should be updated until this is supported to clearly state the no JUnit 5 engine is supported by this flag currently. > Parameter "skipAfterFailureCount" no working > -------------------------------------------- > > Key: SUREFIRE-1698 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1698 > Project: Maven Surefire > Issue Type: Wish > Components: Maven Surefire Plugin > Reporter: Anton Burmakov > Assignee: Tibor Digana > Priority: Major > Labels: junit5 > > I have a Maven test project. In which I use context-related tests. I use a > maven-surefire-plugin to run tests. I need to make the test stop running > after the first failed test. I found a way to do this through > -Dsurefire.skipAfterFailureCount=1, but it doesn't work. Maybe I'm doing > something wrong? Below is my pom.xml: > {code:java} > <properties> > <selenide.version>5.3.0</selenide.version> > <junit.jupiter.version>5.5.1</junit.jupiter.version> > <selenium.java.version>3.141.59</selenium.java.version> > <allure.junit5.version>2.12.1</allure.junit5.version> > <aspectj.version>1.8.10</aspectj.version> > <maven.surefire.plugin.version>3.0.0-M3</maven.surefire.plugin.version> > <junit.platform.launcher>1.5.2</junit.platform.launcher> > <junit.jupiter.engine>5.5.2</junit.jupiter.engine> > <junit.vintage.engine>5.5.2</junit.vintage.engine> > <allure.maven.version>2.10.0</allure.maven.version> > <maven.compiler.source>1.8</maven.compiler.source> > <maven.compiler.target>1.8</maven.compiler.target> > <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> > <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> > </properties> > <build> > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-surefire-plugin</artifactId> > <version>${maven.surefire.plugin.version}</version> > <configuration> > > <argLine>-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar" > -Dsurefire.skipAfterFailureCount=1 > </argLine> > <systemProperties> > <property> > <name>allure.results.directory</name> > > <value>${project.build.directory}/allure-results</value> > </property> > </systemProperties> > </configuration> > </plugin> > </plugins> > </build> > {code} > Also I tried this option: > {code:java} > <build> > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-surefire-plugin</artifactId> > <version>${maven.surefire.plugin.version}</version> > <configuration> > <skipAfterFailureCount>1</skipAfterFailureCount> > > <argLine>-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"</argLine> > <systemProperties> > <property> > <name>allure.results.directory</name> > > <value>${project.build.directory}/allure-results</value> > </property> > </systemProperties> > </configuration> > </plugin> > </plugins> > </build> > {code} > Why is this parameter ignored? -- This message was sent by Atlassian Jira (v8.20.10#820010)