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
是否有方法将失败的TestNG selenium测试堆栈跟踪输出到Ant日志文件?_Ant_Testng - Fatal编程技术网

是否有方法将失败的TestNG selenium测试堆栈跟踪输出到Ant日志文件?

是否有方法将失败的TestNG selenium测试堆栈跟踪输出到Ant日志文件?,ant,testng,Ant,Testng,我在ant xml脚本中有以下TestNG代码段: <testng haltonfailure="true" outputdir="${webtest.outputDir}" dumpCommand="true"> <classpath> <path refid="project.webtest.classpath"/> <pathelement path="${java.class

我在ant xml脚本中有以下TestNG代码段:

    <testng haltonfailure="true" outputdir="${webtest.outputDir}" dumpCommand="true">
        <classpath>
            <path refid="project.webtest.classpath"/>
            <pathelement path="${java.class.path}"/>
        </classpath>
        <sysproperty key=".test.web.webdriver.configFile" value="${webtest.configFile}"/>
        <xmlfileset dir="${webtest.classes}/test/web/webdriver" includes="testng.xml">
        </xmlfileset>
    </testng>


有时,使用此脚本的Selenium测试会失败或被跳过,如果发生这种情况,我总是需要将脚本运行到构建服务器中,以便自己检查TestNG结果,因为它们没有放在日志文件中。是否有一个报告者、一个监听者或类似的东西可以简单地将失败原因写入ant日志?

您是否尝试过设置一个报告者,尤其是TextReporter?cf“reporter”在中,您是否尝试过设置一个记者,尤其是TextReporter?cf和中的“报告者”