2012-03-27 101 views
0

我升級到TestNG 6.4。現在,當我從Eclipse內部執行Test-Suite(使用TestNG插件)時,測試獲得了「新面貌」。但是如果我用ant執行相同的測試套件,報告看起來與TestNG 6.3相同。這是爲什麼?我怎樣才能讓螞蟻以新的面貌創建報告?TestNG 6.4 with ant creatin TestNG 6.3 Reports?

編輯:

我找到了解決辦法...我有,如果你做的硒服務器獨立-2.20.0.jar到類路徑前添加TestNG的-6.4.jar你周圍的其他方法會得到舊的報告。由於selenium.jar包含舊版本的TestNG的...

新報告:

<path id="classpath"> 
    <pathelement location="bin"/> 
    <pathelement location="lib/selenium-server-standalone-2.20.0.jar"/> 
    <pathelement location="lib/testng-6.4.jar"/> 
    <pathelement location="testsuites"/> 
</path> 

舊報告:

<path id="classpath"> 
    <pathelement location="bin"/> 
    <pathelement location="lib/testng-6.4.jar"/> 
    <pathelement location="lib/selenium-server-standalone-2.20.0.jar"/> 
    <pathelement location="testsuites"/> 
</path> 

回答

0

你確定你的Ant構建使用6.4 jar文件?

+0

我不能肯定地說。我沒有進入螞蟻,它顯示了它正在使用的jar。我用eclipse添加了testNG作爲Libary。我沒有放置一個6.3罐子。是否可以使用Selenium隱藏在內部的TestNG? – Tarken 2012-03-27 20:37:50

+0

我添加了6.4jar。我仍然不斷創建舊報告者。 – Tarken 2012-03-30 13:24:10

+0

你是如何添加它的?你如何運行TestNG?確保你在這種情況下做正確事情的最好方法是從命令行運行(沒有ant,不是Maven,沒有IDE)。 – 2012-03-30 15:26:14