Introduction
A Parallel execution is a way ofIntroduction
A Parallel execution is a way of executing multiple instances for every test case of an offline suite on different browsers, environments, and settings.
Qualitia provides a set of execution scripts to perform parallel execution of test cases using Windows PowerShell.
On This Topic:
Table of Contents maxLevel 2
Prerequisites
- Windows PowerShell script execution policy must be set to RemoteSigned.
To do so, launch PowerShell as an administrator and execute following command: Set-ExecutionPolicy RemoteSigned. - Create a Qualitia Offline Suite and the Offline Package. For more instructions, refer to to Offline Package.
Info |
---|
You can Parallel Execution Utility on Selenium Grid, but Selenium Grid cannot be used to manage the parallel execution. |
Configuring the Execution Script for Parallel Execution Anchor ConfiguringExecutionScript ConfiguringExecutionScript
ConfiguringExecutionScript | |
ConfiguringExecutionScript |
In every machine where Qualitia client is installed, it contains the execution script at the following location:
%LocalAppData%\QualitiaWDClient\app-x.x.x\Scripts
This execution script has three different files:
- arguments.ps1: To define the locations for the offline package, associated offline suite, and the reports folder.
- master-configs.csv: To define various instances and their associated execution settings.
- test-configs.csv: To map every test case with defined instance.
To configure the execution script for parallel execution:
- Step 1: Open the arguments.ps1
in a notepad editor.Anchor arguments.ps1 arguments.ps1
Perform the following actions:
Argument | Description |
---|---|
$offline | Enter the absolute path for the Qualitia Offline Package. |
$suitepath | Enter the location for the offline suite folder. |
$logpath | Enter the location for the folder where you want to save test case execution reports and logs. |
$temppath | Enter the location for for the folder where you want to save the temporary files created during test case executions. |
Enclose locations in quotation marks (" ").
- Step 2: Open the master-configs.csv file
This file contains all the master list of configurations. A configuration contains configuration name confignames and arguments under this configuration.
Confignames are different instances of executions to override specific arguments as defined in the associated execution profile. For example, if you want a test case to execute on Internet Explorer 11, Firefox 76.x, Chrome 81.x, then you can define confignames such as IE_11, Firefox_76, and Chrome_81.
Info |
---|
If you do not specify any value to an argument, then test cases are executed as per the associated execution profile. |
Arguments can be processed in the following two different ways:
Both the- Adding all the arguments in the arguments cell
- Adding all the arguments separately in different columns
Both ways are explained below.
Do one of the following:
Adding All the Arguments in
a Singlethe Argument Cell
Anchor AllInOne AllInOne A single configuration can have multiple arguments and you can create as many configurations as required. All the required parameters should be added in a key=value pair in the arguments column. The key=value pair should be separated by single space.
For example:
Adding
all the Arguments Separately in Different Columns
Anchor Separate Separate
You can add different columns for each parameter separately. Keys must be added at the top row and values for these keys should be specified next to the confignameneed to define columns for each settings. For every confignames, add parameters for each setting. If you do not specify any setting, the default is used for execution.
For example:
- Step 3: Open the test-configs.csv file in any CSV supported file such as MS-Excel.
This file specifies the configurations to execute each For every test case, you can specify the instances.
You can combine the test cases ( from the Suite folder ) and the configurations ( from the master-configs.csv ) to execute test cases accordingly.
- You must list Enter the A1 cell as TestCase_Name.
- Enter all the config names from the master-configs.csv in the top columnrow.
- Enter In the first column, from A2, enter the test case name and specify which configuration enter Y against each Confignnames as you want to execute the test case with. You can run single test case using multiple configurations.
Qualitia considers test cases saved in the Suite path mentioned in the 221643108 file only. If you do not want execution on a Configname, specify as N.
Parallel Execution of Test cases using Windows PowerShell
Anchor | ||||
---|---|---|---|---|
|
Perform the following steps to perform parallel execution of test cases using Windows PowerShell.
Info |
---|
Ensure that you have configured the execution scripts to execute test cases using Windows PowerShell. |
To execute test cases using Windows PowerShell:
- Launch Windows PowerShell.
- Enter cd and the location of the execution scripts folder. For example, enter as cd C:\Qualitia\Scripts.
- Run the following command to start parallel execution for the test cases of the offline suite:
.\exec-parallel.ps1
Suite Execution Summary Report
Once After the test case execution is completedcompletes, Qualitia generates a high-level summary report for the test cases executed in the specified environments. The suite execution summary report displays the test case names and the number of total passed and failed test cases. You need to click the execution status (Pass/Fail) to view the step-by-step report of test case execution.
You need to manually update a test case execution result in Real Time Reporting Portal. For more information, refer to Uploading a Test case or Test Suite Execution.