how to customize testng-results.xml (output )file name.

706 views
Skip to first unread message

Harpal Lodha

unread,
Mar 16, 2018, 11:31:13 AM3/16/18
to testng-users
i am running my test case with testng using maven-surefire 
by default its generating xml report in target\surefire-reports\testng-results.xml

i am having requirement to run multiple suites in diff processes and combine report 
i can not rename result files later due to some limitations.

is there any way?  i can customize testng-results.xml file name
 
as testng-results_1.xml and  testng-results_2.xml 

by using some command line arg or by changing in  -DsuiteXmlFile=testng.xml

not willing to implement complete Listener as it will take a lot time.

Thanks
Harpal

Krishnan Mahadevan

unread,
Mar 17, 2018, 11:22:21 PM3/17/18
to testng...@googlegroups.com

You can change the filename by passing it via the JVM argument: -Dtestng.report.xml.name

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/


Reply-To: <testng...@googlegroups.com>
Date: Friday, March 16, 2018 at 9:01 PM
To: testng-users <testng...@googlegroups.com>
Subject: [testng-users] how to customize testng-results.xml (output )file name.

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
testng-users...@googlegroups.com.
To post to this group, send email to
testng...@googlegroups.com.
Visit this group at
https://groups.google.com/group/testng-users.
For more options, visit
https://groups.google.com/d/optout.

Saurabh Tiwari

unread,
Apr 24, 2018, 2:59:06 AM4/24/18
to testng-users
Any idea on how would one change it programatically? 
If somebody has instance of TestNG(). 
Right now I am able to do that by using a custom XML reporter in which I am changing the file name. Any other easier way to do that?


On Saturday, March 17, 2018 at 8:22:21 PM UTC-7, Krishnan Mahadevan wrote:

You can change the filename by passing it via the JVM argument: -Dtestng.report.xml.name

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/


Reply-To: <testng...@googlegroups.com>
Date: Friday, March 16, 2018 at 9:01 PM
To: testng-users <testng...@googlegroups.com>
Subject: [testng-users] how to customize testng-results.xml (output )file name.

 

i am running my test case with testng using maven-surefire 

by default its generating xml report in target\surefire-reports\testng-results.xml

 

i am having requirement to run multiple suites in diff processes and combine report 

i can not rename result files later due to some limitations.

 

is there any way?  i can customize testng-results.xml file name

 

as testng-results_1.xml and  testng-results_2.xml 

 

by using some command line arg or by changing in  -DsuiteXmlFile=testng.xml

 

not willing to implement complete Listener as it will take a lot time.

 

Thanks

Harpal

--
You received this message because you are subscribed to the Google Groups "testng-users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to testng-users+unsubscribe@googlegroups.com.


To post to this group, send email to

Krishnan Mahadevan

unread,
Apr 24, 2018, 8:47:02 AM4/24/18
to testng...@googlegroups.com

You should be able to do it via System.setProperty() no ?

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.


To post to this group, send email to

You received this message because you are subscribed to the Google Groups "testng-users" group.

To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.


To post to this group, send email to

Reply all
Reply to author
Forward
0 new messages