Table of Contents maxLevel 1
Introduction
In order to be competitive in the market, it is important that your application is compatible with multiple platforms and browsers. So, it is required to perform multi-browser testing for the same set of test cases to ensure the cross-platform, cross-browser compatibility of the application.
It takes a considerable amount of time to configure and test everything on every browser, executing test cases one-by-one on each browser and OS separately.
Qualitia provides the ability to configure all the required combinations of properties and perform execution of the test cases in one go. This eliminates the requirement of configuring the properties file separately for each combination differently.
This is achieved using Windows PowerShell and parallel execution script by Qualitia.
Prerequisites
In order to do so, ensure you are meeting following 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.*
- Qualitia Offline Package including execution XMLs.
Note | ||||
---|---|---|---|---|
| ||||
|
Parallel Execution
Parallel execution is a three step process:
- Creating Offline Package
- Configuring Execution Script
- Execution of Testcases using Windows PowerShell
1. Creating an Offline Package
Anchor | ||||
---|---|---|---|---|
|
Creating offline package includes Packaging Execution Engine and Creating Test Packages.
For more information about this, please refer to the Getting Started with Qualitia Bot section.
2. Configuring Execution Script Anchor ConfiguringExecutionScript ConfiguringExecutionScript
ConfiguringExecutionScript | |
ConfiguringExecutionScript |
Once you have created the test package and offline execution engine, you can control execution of these test cases using the execution script provided by Qualitia. This execution script has three different files; arguments.ps1, master-configs.csv, and test-configs.csv.
arguments.ps1
Anchor arguments.ps1 arguments.ps1
This file contains the following locations:
Argument | Description |
---|---|
$offline | Enter the absolute path to the qualitiaoffline-x.x.x.jar. This file exists in the Qualitia Offline Package. |
$xmlpath | Enter the path to the folder where your test cases are saved in the XML format. |
$logpath | Enter the path to the folder which you have created to save the execution logs of the offline package. |
$temppath | Enter the path to the folder to save the temp files during or after execution. |
Enclose locations in quotation marks (" ").
master-configs.csv
This file contains all the master list of configurations. A configuration contains configuration name and arguments under this configuration.
Arguments can be processed in following two different ways:
Both the ways are explained below.
Adding All Arguments in a Single 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 Keys in the Top Row and Values next to Configname
Anchor Separate Separate
You can add different columns for each argument separately. Keys must be added at the top row and values for these keys should be specified next to the configname.
For example:
You can refer to the qualitia.properties, browserstack.properties, and so on files for the complete list of arguments to be used when adding arguments. You can find these property files in the Config folder of Qualitia offline package or at Qualitia installed location (%localappdata%\QualitiaWDClient\app-5.0.0\WebDriver\config).
test-configs.csv
This file specifies the configurations to execute each test case.
Here, you can combine the test cases (from the XML folder) and the configurations (from the master-configs.csv) to execute test cases accordingly.
- You must list all the config names from the master-configs.csv in the top column (refer to the screenshot below)
- 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.
Qualitia considers test cases saved in the XML path mentioned in the Parallel Execution arguments.ps1 file only.
3. Execution of Test cases using Windows PowerShell
Anchor | ||||
---|---|---|---|---|
|
Once all these files are configured, you can continue to execute test cases using Windows PowerShell.
...
- Launch Windows PowerShell.
- Execute following command to run the test cases as per the configurations:
.\exec-parallel.ps1
Execution Reports
Once the execution is completed, Qualitia displays a high-level summary report for the test cases executed in the specified environment(s). 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.
...