Skip to main content

Grid Execution - Running Parallel Tests

tip

Running tests in parallel on multiple devices, often requires using multi-threading in your test scripts. You can either go with classic multi-threading implementation of the language you use to develop your test scripts, or use a unit testing framework that handles threading for you. Java

  • TestNG - highly recommended as it includes efficient and easy instantiation of multiple test instances.
  • JUnit C#
  • NUnit

The number of parallel tests on cloud Grid depends on how many Grid Nodes you have in your cloud account.

To know how many Grid Nodes you have, go to: More -> License -> No. Of Grid Nodes

For example: on this cloud Grid, one can run 10 tests in parallel.

warning

For parallel test execution, it's recommended to create a separate GridClient instance for every Client instance!


What happens to extra tests requests?

Queued Test

When you try to run tests in parallel and you don't have enough Grid Nodes, the requests that do not have enough resources enter the Queued mode. When there are available resources, the tests will move to the Running mode.

Example: 

Scenario: Running 4 tests in parallel on a Grid that contains only 3 Grid Nodes.

We can see that the status of the fourth test request is Queued (waiting for resources) and the other 3 requests are R****unning.

When at least one of the Running tests' status turns into Finished, the  fourth request status will turn to Running 


From Queued to Running

We can see that the status of the third test request has changed to Finished, and right after it (there are enough resources), the fourth request is Running.