You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "M.P. Korstanje (Jira)" <ji...@apache.org> on 2021/07/26 21:59:00 UTC

[jira] [Commented] (SUREFIRE-1849) Cucumber/JUnit5 Test Execution Regression in M4 and M5

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

M.P. Korstanje commented on SUREFIRE-1849:
------------------------------------------

[~tibordigana] it looks like the {{RunListenerAdapter }}is now making assumptions about classes. I can't really work out why though. I guess this is an attempt at squashing the JUnit results tree back into a class/method report.

If so then I guess 


{code:java}
if ( failed || isClass || isTest ){code}

Should be:



 

 
{code:java}
if ( failed || isClass || isTest || isRootContainer ){code}
 

 

So that the {{runListener.testSetCompleted }}is always invoked for the root container. But it all looks very adhoc right now. So I can't quite say what that would break.

https://github.com/apache/maven-surefire/blob/670dbe49855133947fbb436c97d7aa46e81d4d2c/surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/RunListenerAdapter.java

> Cucumber/JUnit5 Test Execution Regression in M4 and M5
> ------------------------------------------------------
>
>                 Key: SUREFIRE-1849
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1849
>             Project: Maven Surefire
>          Issue Type: Bug
>            Reporter: Jacques Burns
>            Priority: Major
>
> My JUnit 5 Cucumber tests fail to execute properly when in Surefire version 3.0.0-M4 and 3.0.0-M5. Downgrading to 3.0.0-M3 solves the issue.
> I've built a small, complete example project demostrating the issue [https://github.com/jmathewburns/surefire-cucumber-junit5-sscce|https://github.com/jmathewburns/surefire-cucumber-junit5-sscce].  You can play with the version property in the `pom.xml` in my example and run the `test` goal
>  
> In M4 and M5, the Cucumber glue is recognised and the step definitions are run, but failed assertions do not affect the outcome of the build. Also, true assertions do not count towards the "Tests run" statistic



--
This message was sent by Atlassian Jira
(v8.3.4#803005)