You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tibor Digana (Jira)" <ji...@apache.org> on 2020/07/08 07:03:00 UTC
[jira] [Comment Edited] (SUREFIRE-1816) XML Report Is generated
incorrect only for failed tests in TestFactory or when
rerunFailingTestsCount>0
[ https://issues.apache.org/jira/browse/SUREFIRE-1816?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17153297#comment-17153297 ]
Tibor Digana edited comment on SUREFIRE-1816 at 7/8/20, 7:02 AM:
-----------------------------------------------------------------
The prerequisite of proper rerun is to have static names of the test.
I am not sure if dynamic satisfy this prereq.
Additionally the dynamic tests require the support of UniqueId and we only started working on yet.
was (Author: tibor17):
The prerequisite of proper rerun is to have static names of the test.
I am not sure if dynamic satisfy this prereq.
Additionally the dynamic tests require the support of UniqueId and we only started working on yet, so there is no support yet.
> XML Report Is generated incorrect only for failed tests in TestFactory or when rerunFailingTestsCount>0
> -------------------------------------------------------------------------------------------------------
>
> Key: SUREFIRE-1816
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1816
> Project: Maven Surefire
> Issue Type: Bug
> Components: Maven Failsafe Plugin
> Affects Versions: 3.0.0-M4
> Reporter: Iuri Litvinov
> Priority: Major
> Labels: reporting, rerun
>
> We have TestFactory with DynamicTests like in example. If rerunFailingTestsCount>0 and one of the tests are failed, the plugin generates XML with only one test or only passed tests.
> If rerun is 0 or all tests passed, everything is ok.
>
> TestFactory:
> {code:java}
> @Tags(Tag("w"))
> @Execution(SAME_THREAD)
> @TestFactory
> fun `Factory tests`() = iterator<DynamicTest> {
> yield(dynamicTest("Test1") {
> assert(false)
> })
> yield(dynamicTest("Test2") {
> assert(true)
> })
> }{code}
>
> Pom contains:
>
> {code:java}
> <artifactId>maven-failsafe-plugin</artifactId>
> <version>3.0.0-M4</version>
> <configuration>
> <consoleOutputReporter implementation="org.apache.maven.plugin.surefire.extensions.junit5.JUnit5ConsoleOutputReporter">
> <disable>false</disable>
> <encoding>UTF-8</encoding>
> <usePhrasedFileName>false</usePhrasedFileName>
> </consoleOutputReporter>
> <statelessTestsetInfoReporter implementation="org.apache.maven.plugin.surefire.extensions.junit5.JUnit5StatelessTestsetInfoReporter">
> <disable>false</disable>
> <usePhrasedClassNameInRunning>true</usePhrasedClassNameInRunning>
> <usePhrasedClassNameInTestCaseSummary>true</usePhrasedClassNameInTestCaseSummary>
> <usePhrasedFileName>false</usePhrasedFileName>
> </statelessTestsetInfoReporter>
> <statelessTestsetReporter implementation="org.apache.maven.plugin.surefire.extensions.junit5.JUnit5Xml30StatelessReporter">
> <disable>false</disable>
> <usePhrasedFileName>false</usePhrasedFileName>
> <usePhrasedTestCaseClassName>true</usePhrasedTestCaseClassName>
> <usePhrasedTestCaseMethodName>true</usePhrasedTestCaseMethodName>
> <usePhrasedTestSuiteClassName>true</usePhrasedTestSuiteClassName>
> <version>3.0</version>
> </statelessTestsetReporter>
> <trimStackTrace>false</trimStackTrace>
> <parallel>classes</parallel>
> <forkCount>${fork.count}</forkCount>
> <threadCount>${fork.count}</threadCount>
> <reuseForks>false</reuseForks>
> <argLine>-Xmx2048m</argLine>
> <rerunFailingTestsCount>1</rerunFailingTestsCount>
> <includes>
> <include>${includeRule}</include>
> </includes>
> <excludes>
> <exclude>${excludeRule}</exclude>
> </excludes>
> <groups>${tags}</groups>
> <reportsDirectory>${project.build.directory}/failsafe-reports/${timestamp}</reportsDirectory>
> <systemProperties>
> <property>
> <name>junit.jupiter.extensions.autodetection.enabled</name>
> <value>true</value>
> </property>
> </systemProperties>
> <systemPropertyVariables>
> <osVersion>${osVersion}</osVersion>
> <device>${device}</device>
> </systemPropertyVariables>
> </configuration>
> <executions>
> <execution>
> <goals>
> <goal>integration-test</goal>
> <goal>verify</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> {code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)