How to run TestNG tests in parallel using Eclipse?

别来无恙 提交于 2019-12-24 18:43:25

问题


I am new to test-ng, I am using eclipse plugin to run test cases. I have an excel file for data. when I am running, it is executing 1 by 1. I know we can execute parallel through cmd by setting parallel="methods" thread-count="2", But it not working in Eclipse plugin. So please tell me how to run TestNG parallel in Eclipse.

Thanks.


回答1:


It seems here is the exact question and the answer to it:

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.

Long story short, it is necessary to have the suite XML file.

Also, please see the documentation on the appropriate part of the suite XML file schema: TestNG: 5.10 - Parallelism and time-outs.



来源:https://stackoverflow.com/questions/47353447/how-to-run-testng-tests-in-parallel-using-eclipse

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!