For Software Development Engineers in Test (SDET), executing tests offline provides flexibility, especially when there is no immediate access to the main software or in environments with limited connectivity.
This guide walks you through the process of working with offline suites in the Qualitia Automation Studio (QAS) using Command Line Interface (CLI) commands.
📚Prerequisites
Access to the QAS Client.
An offline package saved on your computer.
Basic familiarity with CLI operations.
🔂 Procedure
Edit Test Data for Offline Suite
You can edit test data for an offline suite either using Qualitia Client or test data Excel file present in Offline Suite folder.
Editing the Test Data using Qualitia Client
Open your test case from the client.
Access the Test Data explorer to edit.
Once done, re-create the offline suite.
Refer to the section Work with Offline Packages.
Edit Test Data Using Test Data File
You can also edit the test data directly in the Excel file located in the Offline Suite folder. However, it is recommended to edit through the Qualitia Client as it provides error alerts for incorrect data modifications.
Qualitia recommends using the Qualitia Client because it displays ❌ error message when change in test data is incorrect.
In scenarios where access to the Qualitia Client is limited, the offline suite provides flexibility by allowing you to directly modify test data through the Excel file present in Offline Suite folder.
After the offline suite is created, for every test case that contains test data, the associated test data as excel files are created in the same folder with the same names as given to their associated test cases. You can modify the test data such as replace the existing test data and enable or disable TC iterations.
📚Prerequisites
An offline suite with associated test data.
Basic knowledge of Excel and data formats.
Basics of Editing Test Data
You want to quickly adjust test data without altering the structure of the file.
Don not add or remove columns, or change the column order.
Use $NULL$ where you don not want to set a value for a parameter.
Delete rows for unwanted task or test case (TC) iterations.
Steps to Modify Test Data for an Offline Suite
Go to the Offline Suite folder.
Backup the test data file you want to edit.
Open the test data Excel file.
You can update the values for the below fields, as needed.
TC Iteration: Shows the number for every TC Iteration. There must be at least one TC Iteration for executing the test case.
Selection: Shows True for the enabled test case iterations; Otherwise, it shows False. You can modify the values only for test case iterations.
DataSetTag: Optionally, enter a label for identifying the dataset in the test case execution report. You can modify the values.
To add a TC iteration, insert a row with values for TC Iteration Number, Selection, and DataSetTag (optional).
For adding a task iteration, insert a row with values for associated parameters.
Save the Excel file after editing.
The first row of the Excel file shows tasks in grey and the second row shows the corresponding task parameters. So, these rows are not editable. You can edit test data from the third row onwards.
Execute Offline Suite on a Shared Drive
You can execute an Offline Suite present in a shared drive for web and mobile applications in one of the following ways:
By mapping the shared drive to the local computer.
Without mapping the shared drive to the local computer.
Execute a Shared Offline Suite by Mapping
For a more seamless experience, you might prefer mapping the shared drive to your local system.
Copy both the offline package and suite to the shared drive.
Ensure you have the read and write permissions.
Map this shared drive to your local computer.
Update the offline suite settings, as required.
For details, refer to Configuring the Settings for an Offline Suite.
To execute, follow one of these approaches:
Using the Command Prompt, go to the mapped location and execute the offline package with the right command.
For details, refer to section Executing Offline Suite using CLI Commands.
Open the mapped driver and simply double-click the offline package (9.x.x jar).
Execute a Shared Offline Suite Without Mapping
To execute a shared drive without mapping the shared drive to the local computer:
Copy the offline package along with the offline suite to the shared drive.
Ensure you have the read and write permissions.
Open the shared location and double-click the offline package (9.x.x jar).
Note: You cannot execute an offline suite using the command prompt by specifying the complete UNC (Shared location).
Execute Offline Suite for Desktop Applications on a Shared Drive
You can execute an offline suite present in a shared drive for desktop applications.
Before you execute an offline suite for a desktop application, ensure that you have:
Installed UFT on the same computer from where you will execute the offline suite.
Mapped shared drive to local computer.
Copied offline package to shared drive with read and write access.
Copied TSR file in the local or shared drive and ensure you have access.
To execute offline suite for desktop applications on a shared drive:
Configure the offline suite as per the requirements. For detailed instructions, refer to Configuring the System Execution Profile Settings for a Desktop Project.
Do one of the following:
Open command prompt, navigate to mapped drive location that contains the offline package and offline suite.
Execute the offline suite using the command line. For detailed instructions, refer to Configuring the Qualitia Client Settings.
Navigate to the mapped drive location that contains the offline package and the offline suite and double-click the offline package (9.x.x jar).
Execute Offline Suites using CLI
Qualitia supports integration with Continuous integration tools like Jenkins, TeamCity, and Bamboo. It enables developers to find and solve defects in a code base rapidly and to automate testing of their builds.
When you want to execute your test cases using CI tools, you must set the CI_Tool property in the mapped execution profile.
If your test case is for mobile applications, Appium Server is internally hosted on Qualitia client. However, still you can use a custom Appium server if you want to test on another Appium version.
Executing an Offline Suite from a Shared Drive without Local Mapping:
Method: Direct execution from the shared drive. Steps:
Copy both the offline package and suite to the shared drive, ensuring you have read/write permissions.
Directly access the shared location and initiate the offline package by double-clicking on the 9.0.x jar file.
Note: Using the command prompt with the full UNC path for execution isn't supported.
Execution using Continuous Integration Tools:
Method: Integration via QAS settings.
Ensure QAS's capability to integrate with CI tools like
Jenkins
TeamCity
Bamboo.
For mobile application tests, even though QAS hosts the Appium Server internally, use a custom Appium server for different Appium versions if needed.
Set the CI_Tool property in the mapped execution profile before starting.
Headless Executions:
Method: Browser-based testing without GUI.
Steps:
Recognize that headless executions run faster since they don't launch the browser UI. QAS supports this for Google Chrome and Mozilla Firefox.
To execute tests in headless mode:
Via QAS Client/OfflineConfigManager:
Open the associated execution profile.
Choose the browser.
Activate the respective headless setting, via CLI:
For Chrome: java -jar qualitiaoffline-xxxx.jar googleChrome.chromeOptions.args=--headless
For Firefox: java -jar qualitiaoffline-xxxx.jar firefox.firefoxOptions.args=--headless
Note: Xvfb on Linux isn't supported anymore. Use the methods mentioned for headless execution on Linux.
Method: Setup via Qualitia Client or OfflineConfigManager.
Steps:
Open the associated execution for a test suite.
From the Browser list, select either Chrome or Firefox.
Check the "Desired Capabilities" checkbox.
Based on your browser choice:
For Chrome:
Select the chromeOptions checkbox.
Check the args checkbox.
Input --headless in the associated field.
For Firefox:
Select the firefoxOptions checkbox.
Check the args checkbox.
Input --headless in the associated field.
Click Ok.
Method: CLI-based execution for headless mode.
Steps:
Open the Command Prompt.
Navigate to the directory containing the offline package.
To run on Chrome, use: java -jar qualitiaoffline-xxxx.jar googleChrome.chromeOptions.args=--headless
For Firefox execution, input: java -jar qualitiaoffline-xxxx.jar firefox.firefoxOptions.args=--headless
🔧 Got a problem? Let’s fix!
Execution is getting aborted after triggering the suite for offline execution. “Fatal exception during execution”: You might get this error if the Test Case name contains slash (/). To successfully execute an offline suite, avoid using slash in the Test Case name.