Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

A Parallel execution is

Introduction

A Parallel execution is a way of executing multiple instances for every test case of an offline suite simultaneously 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
maxLevel2

Pre-Requisites

  • Windows PowerShell script execution policy must be set to RemoteSigned.
    To do so, launch PowerShell as an administrator and execute the following command: Set-ExecutionPolicy RemoteSigned.

  • Create a Qualitia Offline Suite and the Offline Package.  For instructions on how to create an offline package, refer to Offline Package.
Info

You can execute Parallel Executions on Selenium Grid, but Selenium Grid cannot be used to manage the parallel executions.


Configuring the Execution Script for Parallel Execution
Anchor
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 configure the locations for the offline packagetest artifacts: Offline Package, associated offline suite, and the reports folder.
  • master-configs.csv: To define various instances configure the Configames and their associated execution settings.
  • test-configs.csv: To map every test case with the defined instanceConfignames.


Configuring the Locations for the Associated Test Artifacts

To configure the location of for the associated test artifacts:

  1. Open the arguments.ps1 
    Anchor
    arguments.ps1
    arguments.ps1
    in a notepad editor.
    Enter the required information as shown in the following table.
Argument Description
$offlineEnter the absolute path for the Qualitia Offline Package. 
$suitepathEnter the location for the offline suite folder.
$logpathEnter the location for the folder where you want to save test case execution reports and logs.
$temppathEnter the location for the folder where you want to save the temporary files created during test case executions. 


Info

 Enclose locations in quotation marks (" ").

Configuring the

Confignames and Associated Parameters

Confignames 

Confignames are A Confignames is a pre-defined set of configured settings for different instances of executions to override specific arguments as defined in the associated execution profile. used to execute test cases.  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, Firefox_76, and Chrome_81.

If you do not specify any setting, then Qualitia uses the values defined in the associated execution profile.

You can configure the parameters one of the following ways:

  • Adding all the parameters in the arguments cell
  • Adding all the parameters separately in different columns

    Note: If you do not specify any value to a specific parameter for a configname, then test cases are executed as per the associated execution profile.

To configure the Confignames:

  1. Open the master-configs.csv file.
    This file contains all the master list of configurations. A configuration contains confignames and arguments under this configuration.
  2. Do one of the following: 
  • Adding All the Parameters in the arguments Cell 
    Anchor
    AllInOne
    AllInOne

    Under the arguments column, you can add all the values of parameters in the key=value format and separate parameters with a single space.

    The following screenshot is an example of adding arguments.

    • Adding all the Parameters Separately in Different Columns

     
    Anchor
    Separate
    Separate

    You need to define columns for each parameter for every configname . For every confignames, add values for each paarameter. 

    The following screenshot shows an example on how to add parameters for each setting.

     
Configuring


Mapping the

Test Cases Step 3:

Configured Confignames for Test Cases

For every test case, you need to map with the different confignames for having executions on different browsers, environments, and settings.


To map the configured Confignames with Test Cases:

  1. Open the test-configs.csv file in any CSV supported file such as MS-Excel
.

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
  1. .
csv to execute test cases accordingly.
  1. Enter the A1 cell as
  2. TestCase_Name.Enter
  3. TestCase_Name.
  4. Under the TestCase_Name column, enter every test case name in different cells as specified in Offline Suite folder.
  5. Starting from B1, enter all the config names from the in each cell of the top row as defined in master-configs.csv in the top row.
  6. In Under the first TestCase_Name column, from A2, enter the for every test case name and , enter Y against each Confignnames as that you want to execute. If Else, enter as N, if you do not want execution on for a Configname, specify as N.


    The following screenshot shows an example of how to add parameters for each settingmap confignames with test cases.

Parallel Execution of Test cases using Windows PowerShell 
Anchor
ExecutionofTestcasesusingWindowsPowerShell
ExecutionofTestcasesusingWindowsPowerShell


Info

Ensure that you have configured the execution scripts to execute test cases using Windows PowerShell.


To execute test cases using Windows PowerShell:

  1. Launch Windows PowerShell.
  2. Enter cd and the location of the execution scripts folder. For example, enter as cd C:\Qualitia\Scripts.
  3. Run the following command to start parallel execution for the test cases of the offline suite: 
    .\exec-parallel.ps1

Suite Execution Summary Report

After the test case execution completes, 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.