简体   繁体   中英

how to save the testng-results.xml file to different folder other than test-output folder?

I need help on saving the testng-results.xml (that gets created automatically) into my folder [Folder name(with current date): outputfolder_11-11-2013]

This is how I am running my testng.xml:

1. I use eclipse
2. right click on testng.xml > Run as > TestNg Suite
3. I added a "-usedefaultlisteners false" in the Arguments box of the 
   "Run Configurations"

When I run my testng.xml with the above settings, it is not creating testng-results.xml.

I want either of below two things to be done from my Configurations in Eclipse:
1. I want testng-results.xml to be created and saved in my(given) folder "outputfolder_11-11-2013_13-10-02", This is dynamically created folder with the current system time (outputfolder_DD-MM-YYYY_HH-MM-SS)

OR

2. I want to save testng-results.xml by appending current date and time in my local folder "TESTOUTPUT". I should be abel to identify results file with the time stamp. My test-results.xml should be this way "testng-results_11-11-2013_13-56-34.xml (testng-results_DD-MM-YYYY_HH-MM-SS.xml)

How shall I achieve this by configuring eclipse? Please suggest.

您需要重新配置 XML Reporter: http ://testng.org/doc/documentation-main.html#logging-xml-reports

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM