关闭TestNG中的测试输出 [英] Turning off test-output in TestNG

查看:166
本文介绍了关闭TestNG中的测试输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在使用此XML文件启动我的测试:

I am currently launching my suit of tests using this XML file:

<suite name="something">
    <test name="generic valid compilation">
        <parameter name="isValid" value="true"/>
        <parameter name="testGroup" value="generic"/>
        <groups>
            <run>
                <include name="compilation"></include>
                <exclude name="module"></exclude>
                <exclude name="refinement"></exclude>
                <exclude name="specifications"></exclude>
            </run>
        </groups>
        <classes>
            <class name="test.TestLauncher"/>
        </classes>
    </test>
</suite>

我正在寻找一种方法来切断TestNG似乎做的生成的测试输出文件夹默认情况下。从 http://reportng.uncommons.org/ 我可以看到

and I am looking for a way to cut off the generated test-output folder that TestNG seems to do by default. From http://reportng.uncommons.org/ I can see that


您可能还想通过将
的useDefaultListeners属性设置为
false来禁用
默认的TestNG记者。

You may also want to disable the default TestNG reporters by setting the useDefaultListeners attribute to "false".

这似乎符合我的需要,不是因为他们的XML结构看起来与我的不同。

which seems to suit my needs, wouldn't it be the fact that their XML structure seems different than mine.

有人知道如何用TestNG关闭测试输出文件吗?

Does anybody know how to turn the test output files off with TestNG?

谢谢

推荐答案

就像你说的那样,只需使用此标志即可关闭默认报告。确切的名称取决于您使用的是命令行,ant还是maven。在与您相关的文档中查看此字符串。

Like you said, just use this flag to turn off the default reports. The exact name depends on whether you're using the command line, ant or maven. Look this string up in the documentation that is relevant to you.

这篇关于关闭TestNG中的测试输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆