SeaLights .NET agent - Running tests in Parallel (Lab Id)

The Lab ID groups two or more instances of the Test Listener as running under the same environment, for the same application.

This is useful when running multiple test stages for the same application in parallel:

In the above example, separate IIS servers are referenced. This can be done on the IIS server level, or alternatively, on the Application Pool level.

In case the application reports coverage to a specific process, and not to the IIS instance (as is the case with Unit Tests), the background test listener needs to receive the same Lab ID parameter.



For proper configuration that will allow parallel testing, the following MUST be configured with the same Lab ID:

  1. CLI commands that start/end the coverage collection

  2. CLI commands that start/end the Test Stage

The following examples contains the configuration relevant to the QA-1 Lab, which appears in the diagram as the instance displayed on the far-left hand side:

For applications reporting coverage from IIS:

Sample LabID configurations for .NET applications
// Lab ID implemented in the CollectorServiceSession start/end commands: SL.DotNet.exe startCollectorServiceSession --buildSessionIdFile buildSessionId --processName w3wp.exe --processTag DefaultAppPool --includeChildProcesses true --labid QA-1 SL.DotNet.exe stopCollectorServiceSession --stopAllSessions --processName w3wp.exe --processTag DefaultAppPool --labid QA-1 //Lab ID implemented in the Test Stage start/end commands: SL.DotNet.exe startExecution --buildSessionIdFile buildSessionId --testStage "Functional Tests" --labId QA-1 //<Run your tests in between these two commands> SL.DotNet.exe endExecution --buildSessionIdFile buildSessionId --testStage "Functional Tests" --labId QA-1

For applications reporting coverage to a local process:

Sample LabID configurations for .NET applications
// Lab ID implemented in the backgroundTestListener start/end commands: SL.DotNet.exe startBackgroundTestListener --buildSessionIdFile buildSessionId --testListenerSessionKey Unit_Tests --labid QA-1 SL.DotNet.exe stopBackgroundTestListener --buildSessionIdFile buildSessionId --testListenerSessionKey Unit_Tests --labid QA-1 //Lab ID implemented in the Test Stage start/end commands: SL.DotNet.exe startExecution --buildSessionIdFile buildSessionId --testStage "Functional Tests" --labId QA-1 //<Run your tests in between these two commands> SL.DotNet.exe endExecution --buildSessionIdFile buildSessionId --testStage "Functional Tests" --labId QA-1