gpt4 book ai didi

java - 如何使用 Eclipse 并行运行 TestNG 测试?

转载 作者:太空宇宙 更新时间:2023-11-04 10:55:31 24 4
gpt4 key购买 nike

我是 test-ng 的新手,我正在使用 eclipse 插件来运行测试用例。我有一个 excel 数据文件。当我运行时,它正在执行 1 by 1。我知道我们可以通过设置 parallel="methods"thread-count="2" 通过 cmd 并行执行,但它在 Eclipse 插件中不起作用。所以请告诉我如何在 Eclipse 中并行运行 TestNG。

谢谢。

最佳答案

这似乎是确切的问题及其答案:

When you are running an XML file, you can specify all the settings you want for this run in the XML file, but what if you want to run a package in parallel mode with specific listeners? How can you configure the settings for all the launches that are not done from an XML file?

In order to give you access to the most flexibility, TestNG lets you specify an XML suite file for all these launches, which you can find in the Preferences menu: screenshot.

If you specify a valid suite file as "XML template file", TestNG will reuse all the settings found in this XML file, such as parallel, name, listeners, thread pool size, etc... Only the <test> tags in this file will be ignored since the plug-in will replace these by a generated <test> tag that represents the launch you chose.

TestNG - Eclipse.

长话短说,必须有套件 XML 文件。

此外,请参阅有关套件 XML 文件架构相应部分的文档:TestNG: 5.10 - Parallelism and time-outs .

关于java - 如何使用 Eclipse 并行运行 TestNG 测试?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47353447/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com