Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/360.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java TestNG 6.4和ant creatin TestNG 6.3报告?_Java_Ant_Testng - Fatal编程技术网

Java TestNG 6.4和ant creatin TestNG 6.3报告?

Java TestNG 6.4和ant creatin TestNG 6.3报告?,java,ant,testng,Java,Ant,Testng,我升级到TestNG 6.4。现在,当我在Eclipse中执行一个测试套件(使用TestNG插件)时,测试得到了“新的外观”。但是如果我使用ant执行相同的测试套件,那么报告看起来与TestNG 6.3相同。为什么呢?如何让ant创建具有新外观的报告 编辑: 我找到了一个解决办法。。。我必须将testng-6.4.jar添加到类路径的selenium-server-standalone-2.20.0.jar之前,如果您使用其他方法获取旧报告。由于selenium.jar在旧版本中包含testng

我升级到TestNG 6.4。现在,当我在Eclipse中执行一个测试套件(使用TestNG插件)时,测试得到了“新的外观”。但是如果我使用ant执行相同的测试套件,那么报告看起来与TestNG 6.3相同。为什么呢?如何让ant创建具有新外观的报告

编辑:

我找到了一个解决办法。。。我必须将testng-6.4.jar添加到类路径的selenium-server-standalone-2.20.0.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>


你确定你的ant构建使用的是6.4JAR文件吗?

我不能肯定。我在ant中没有显示它正在使用哪个jar的条目。我将testNG添加为eclipse库。我没有一个6.3罐的瓶子。可能是使用了Selenium隐藏在其中的TestNG吗?我添加了6.4jar。我一直在创作老的报告人。你是怎么添加的?您如何运行TestNG?确保在这种情况下正确操作的最佳方法是从命令行运行(没有ant,没有Maven,没有IDE)我在一个套件或包含多个其他套件的套件中运行ant。我的意思是,我在一个套件或包含其他套件的套件中运行测试。最后一个通过ant执行。