[ 
https://issues.apache.org/jira/browse/SUREFIRE-1698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16953069#comment-16953069
 ] 

Tibor Digana commented on SUREFIRE-1698:
----------------------------------------

[~Ningiszida]
If you use JUnit5 then please convince the JUnit5 team. I can't do it more!
The feature request has actually no discussion. The reality is that JUnit5 
architecture disallowed the team to implement the method {{pleaseStop}}. We 
know that clear solution would be to do it with {{pleaseStop}} (it is however 
in JUnit4) but I do not say that JUnit4 architecture is perfect and I don't say 
that JUnit5 is cool, all have troubles in the architecture design but it does 
not mean that it has to stay as it is without the fix or new feature 
{{pleaseStop}} (and new status {{interrupted}} test).
[1]: https://github.com/junit-team/junit5/issues/1880

> Parameter "skipAfterFailureCount" no working
> --------------------------------------------
>
>                 Key: SUREFIRE-1698
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1698
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Surefire Plugin
>            Reporter: Anton Burmakov
>            Priority: Blocker
>
> 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.3.4#803005)

Reply via email to