TestConcurrency method

Class: RunnerOptionsPlatform: Selenium 3Language: C# SDK:

Use this method to specify the maximum number of Eyes tests that this Runner will run concurrently.

Effectively, this means that if the test concurrency value is set to 10, you'll see up to 10 test results marked as running in the Test Manager, for tests executed by that runner. Since a runner can run multiple test scripts concurrently, and each test checkpoint can be validated for multiple environments, the test results in the running state may reflect the concurrency of both test scripts and the environments. The maximum concurrency achieved may be lower than the number you specify, since concurrency is also limited by other factors, such as the concurrency limit of your account or team, or other tests being run at the same time in your account.

Syntax


runner = new VisualGridRunner(new RunnerOptions().TestConcurrency(10)); 

Parameters

concurrency
Type:int
The maximum number of Eyes tests that can be executed concurrently by this runner.

Return value

Type: RunnerOptions

Example

The example below demonstrates the creation of a VisualGridRunner instance. It is initialized with a call to the constructor RunnerOptions. A call to TestConcurrency is then appended with a parameter of 10. This runner instance is passed to the Eyes instance when it is created. The end effect is that the runner manages the workflow and concurrency of all Eyes instances that are initialized with that runner. Passing a parameter of 10 means that the runner limits the concurrency to a maximum of 10 active test executions.

private EyesRunner runner = null;
runner = new VisualGridRunner(new RunnerOptions().TestConcurrency(10)); 
eyes = new Eyes(runner);