[
https://issues.apache.org/jira/browse/SUREFIRE-1346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16381929#comment-16381929
]
Nicolas Zin edited comment on SUREFIRE-1346 at 3/1/18 12:41 PM:
----------------------------------------------------------------
Hi guys,
I just faced the problem you are mentioning (my maven-failsafe-plugin is
configured to use several fork (2)), and testng-results.xml is overwritten by
each thread/fork.
I tried to configure the reportsDirectory in my pom.xml, but so far I didn't
manage to set it properly. I tried something like:
{{<plugin>}}
{{ <artifactId>maven-failsafe-plugin</artifactId>}}
{{ <version>2.18.1</version>}}
{{
<reportsDirectory>${project.build.directory}/surefire-reports/${surefire.forkNumber}</reportsDirectory>}}
{{ ...}}
</plugin>
But I finish with a directory named
"target/surefire-reports/${surefire.forkNumber}/testng-results.xml"
i.e. the variable is not interpolated
Do you known which value I can use instead of surefire.forkNumber? or even
better is there a ${surefire.classname} ?
was (Author: nzin):
Hi guys,
I just faced the problem you are mentioning (my maven-failsafe-plugin is
configured to use several fork (2)), and testng-results.xml is overwritten by
each thread/fork.
I tried to configure the reportsDirectory in my pom.xml, but so far I didn't
manage to set it properly. I tried something like:
{{<plugin>}}
{{ <artifactId>maven-failsafe-plugin</artifactId>}}
{{ <version>2.18.1</version>}}
{{
<reportsDirectory>${project.build.directory}/surefire-reports/${surefire.forkNumber}</reportsDirectory>}}
{{ ...}}
{{</plugin> }}
But I finish with a directory named
"target/surefire-reports/${surefire.forkNumber}/testng-results.xml"
i.e. the variable is not interpolated
Do you known which value I can use instead of surefire.forkNumber? or even
better is there a ${surefire.classname} ?
> surefire-reports overwrite each other when using reuseForks=false
> -----------------------------------------------------------------
>
> Key: SUREFIRE-1346
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1346
> Project: Maven Surefire
> Issue Type: Bug
> Components: process forking, TestNG support
> Affects Versions: 2.19.1
> Reporter: Antoine Tran
> Priority: Major
>
> In a Maven project with the setting "<reuseForks>false</reuseForks>" and
> TestNg, the file testng-result.xml gets overwritten by the last test.
> I somehow understand why it is difficult to avoid this by design of fork, but
> a workaround solution, as suggested by SUREFIRE-1018 or SUREFIRE-446, is to
> use the individual TEST-[className].xml files.
> However, if I use a Jenkins plugin like testng, I cannot make him ingest
> these files, as they do not have the same structure as testng-result.xml.
> This is a bug of testng, rather than the Jenkins plugin testng. Couldn't we
> make testng-result-[className].xml, for each test, with the testng-result.xml
> structure? Otherwise, the Jenkins plugin
> https://wiki.jenkins-ci.org/display/JENKINS/testng-plugin is completely not
> usable.
> Thank you.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)