简体   繁体   中英

How to run TestNG tests in parallel using Eclipse?

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.

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM