Versions Compared

Key

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

Introduction

A Parallel execution is a way of executing multiple instances for every test

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, You need to launch PowerShell as an administrator and execute the following command: Set-ExecutionPolicy RemoteSigned.
  • Create a Qualitia an Offline Suite package and the Offline PackageSuite.  For instructions on how to create an offline package and offline suite, 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 Every machine where Qualitia client is installed, it that has Qualitia Client contains the execution script used for parallel executions at the following location:

%LocalAppData%\QualitiaWDClient\app-x.x.x\Scripts

This execution script has the following three different files:

  • arguments.ps1: To configure the locations for test artifacts: Offline Package, associated offline suite, and the reports folder.
  • master-configs.csv: To configure the Configames define Confignames and configure their associated execution settings.
  • test-configs.csv: To map every test case with the defined Confignames.
Configuring the Locations for the Associated Test Artifacts
  • .

Configuring the Locations for the Associated Test Artifacts

You need to configure the location for the following test artifacts: 

  • Offline Package: The software package that is used to execute the offline suites.
  • Offline Suite: The offline copy of a test suite that contains the test cases.
  • Reports: The test case execution results which also contains screenshots and the associated logs. 

To configure the location for the associated test artifacts:

  1. Open the arguments.ps1 
    Anchor
    arguments.ps1
    arguments.ps1
    in a
    notepad editortext editor, such as Notepad or Notepad++.
  2. 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
that are generated during test case executions. 


Info

 Enclose locations in quotation marks (" ").

Configuring the Confignames 

A Confignames Configname is a pre-defined set of configured settings for different instances used to execute test cases.  used for a specific execution instance. 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.If you do not specify any setting, then Qualitia uses the values defined in the associated execution profile.

You can configure the parameters settings of a Configname in one of the following ways:

  • Adding Entering all the parameters in the arguments cellAdding
  • Note: 

    Entering all the parameters separately in different columns




    Info

    You need to open a json file of an execution profile located in the Execution Subfolder of offline suite folder. For example for defining a browser, type as BrowserName and browser as explorer, Google Chrome and Firefox.  

    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:

Do
  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.
  1. Enter as configname and arguments in the cells: A1 and B1.
  2. To add values for settings of a configname, do one of the following:
 
Adding All the Parameters


To add all the parameters in the arguments
Cell 
Cell
Anchor
AllInOne
AllInOne

Under the arguments column,

you can

add all the values of

parameters

the settings in the key=value format and separate the parameters with a single space

.

The following screenshot is an example of adding arguments.

Image Removed

Adding

as shown in the following screenshot:Image Added

To add all the Parameters Separately in Different Columns

 

Anchor
Separate
Separate

You need to define columns for each parameter for every configname . For every confignames
  1. In the top row next to arguments, enter the name settings in each cell as defined in the execution profile json file.
  2. For every configname, add values for each

paarameter. 
The following screenshot shows an example on how to add parameters for each setting.
Image Removed 
  1. setting as shown in the following screenshot:

    Info

    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.


    Image Added


Mapping the 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 settingsthe different Confignames.

To map the configured Confignames with Test Cases:

  1. Open the test-configs.csv file in any CSV supported file such as MS-Excel.
  2. Enter the A1 cell as TestCase_Name in the A1 cell.
  3. Under the TestCase_Name column, enter every name of test case name in different cells as specified in Offline Suite folderof the offline suite in the same sequence.
  4. Starting from B1, enter all the config names Confignames in each cell of the top row as you have defined in master-configs.csv.
  5. Under the TestCase_Name column, for For every test case, enter do the following:
    • Enter Y against
    each
    • the Confignnames that you want to execute.
    Else, enter as N, if
    • Enter N against the Confignames that you do not want
    execution for a Configname
    • to execute.

      The following screenshot shows
    an example of
    • how to map confignames with test cases.

Image RemovedImage Added

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 (Confignames). You need to open the folder as the path specified by you in arguments.ps1.

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 executionof total passed and failed test cases. You need to click the execution status Pass or Fail to view the test case execution report.

Here, Fail denotes the test case execution has failed or it has defects. Also, Not Executed denotes the execution did not start due to some technical reason or you have entered as No for the specific configname, in master-configs.csv.

The following screenshot shows how a parallel execution report is displayed.

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.