Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 28 Next »

Introduction


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 have parallel execution of  test cases using Windows PowerShell.

On This Topic:

Prerequisites


  • Windows PowerShell script execution policy should be set to RemoteSigned. (To do so, launch PowerShell as an administrator and execute following command: Set-ExecutionPolicy RemoteSigned.
  • Execution script provided by Qualitia are present in the following location.
    %LocalAppData%\QualitiaWDClient\app-x.x.x\Scripts
  • Create a Qualitia Offline Suite and the Offline Package.  For more instructions, refer to  Offline Package.

Configuring Execution Script 

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, master-configs.csv, and test-configs.csv
To configure execution script for parallel execution:

  • Step 1: Open the arguments.ps1  in a notepad editor.

Perform the following actions:

Argument Description
$offlineEnter the absolute path of the Qualitia Offline Package. 
$suitepathEnter the path of the offline suite folder.
$logpathEnter the path of the folder in which you want to save test case execution reports and logs.
$temppathEnter the path to the folder to save the temp files during or after execution. 

(warning) 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 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 12, Firefox 32.x, Chrome 56.x, then you can define confignames such as IE_11, Firefox_32, and Chrome_56.

Note: 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 following two different ways:

Both the ways are explained below.

Do one of the following: 

  1. Adding All Arguments in a Single Cell 

    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:

  2. Adding Keys in the Top Row and Values next to Configname 
    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 configname. 
    For example:

     


(info) You can refer to any JSON file of an execution profile present in Execution Profile folder. This file can be found in the Execution Profiles folder present in the offline suite folder.

  • 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 test case.

You can combine the test cases (from the Suite folder) and the configurations (from the master-configs.csv) to execute test cases accordingly.

  1. You must list all the config names from the master-configs.csv in the top column (refer to the screenshot below)
  2. Enter the test case name and specify which configuration you want to execute the test case with. You can run single test case using multiple configurations.
    (warning) Qualitia considers test cases saved in the Suite path mentioned in the Parallel Execution#arguments.ps1 file only.

Parallel Execution of Test cases using Windows PowerShell 

Ensure 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

Once the execution is completed, Qualitia displays a high-level summary report for the test cases executed in the specified environments. Execution report displays the test case names and the number of total passed and failed test cases. You can then click the execution results (Pass/Fail) to view the step-by-step report of test case execution.


  • No labels