簡體   English   中英

如何將 testng-results.xml 文件保存到 test-output 文件夾以外的不同文件夾?

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

我需要幫助將 testng-results.xml(自動創建)保存到我的文件夾中 [文件夾名稱(當前日期):outputfolder_11-11-2013]

這就是我運行 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"

當我使用上述設置運行我的 testng.xml 時,它不會創建 testng-results.xml。

我希望從我在 Eclipse 中的配置中完成以下兩件事:
1.我希望創建testng-results.xml並將其保存在我的(給定)文件夾“outputfolder_11-11-2013_13-10-02”中,這是使用當前系統時間動態創建的文件夾(outputfolder_DD-MM-YYYY_HH-MM -SS)

或者

2. 我想通過在我的本地文件夾“TESTOUTPUT”中附加當前日期和時間來保存 testng-results.xml。 我應該能夠識別帶有時間戳的結果文件。 我的 test-results.xml 應該是這樣的“testng-results_11-11-2013_13-56-34.xml (testng-results_DD-MM-YYYY_HH-MM-SS.xml)

我將如何通過配置 eclipse 來實現這一點? 請建議。

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM