简体   繁体   中英

How can I parallelize multiple instances of the same Selenium suite using Junit?

I have a Junit test suite that I am using to run a series of selenium tests. I need to run these tests on several platforms (browser/OS combos, mobile devices). Is there a way for me to run the suite in parallel with 4 other instances of the same suite (5 total), each with different config settings (settings for the RemoteWebDriver).

Should I us a parallelized runner (I've seen a few options) on each test within the suite or parallelize the suite itself?

Also, is there a way to run a sequence of these parallel runs? (ie 5 parallel runs followed by another 5 parallel runs, etc.)

You want to use Selenium Grid for this.

To run tests in parallel with JUnit4, you will also need Maven .

Remember that Selenium grid does not provide the parallel distribution of your tests, it is simply a way to allow multiple threads hit the same endpoint to support parallel testing.

You still need a mechanism to support the parallel distribution of your tests.

I know this can be achieved with JUnit, but in my experience it is easier with TestNG

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