Versions Compared

Key

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

Introduction: For Software Development Engineers in Test (SDET), executing tests offline provides flexibility, especially when there 's is no immediate access to the main software or in environments with limited connectivity.

This guide will walk 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.

Process Flow:

...

🔂 Procedure

Execute Offline Suite using CLI Commands

·       Use Case: You want to run tests offline using command prompt due to limited access to the QAS client.

·       First, open The offline package runs the chosen offline suite with its set execution profile, which can be customized to override pre-configured settings.

  1. If testing on a mobile platform, ensure the execution profile has the right system requirements and settings.

  2. For remote or cloud executions, follow the guidelines for the respective environments. 

To execute an offline package using CLI commands.

  1. Open the Command Prompt.

...

  1. Go to the location

...

  1. where you have saved the offline package.

...

  1. Enter the following code: java -jar qualitiaoffline-

...

  1. 9.

...

  1. 0.x.jar

...

    1. The offline package

...

    1. is executed using the

...

    1. settings defined in the Qualitia Offline Configuration Manager.

...

·       However, if you wish to override certain settings:

...

  1. Override any of the following parameters:

    1. Mapped Execution Profile – Enter the location of the Execution Profile you want in the following ways:

      1. The location of the execution profile must be enclosed by double inverted commas. Note that you do not require any key.

      2. Your first argument must be as follows: java -jar qualitiaoffline-

...

      1. 9.

...

      1. 0.x.

...

      1. jar "D:/ABCsettings.JSON

    1. Offline Suite – Enter the location of the offline suite as SuitesDir="Suite_Path".
      For example, java -jar qualitiaoffline-

...

    1. 9.

...

    1. 0.x.

...

    1. jar SuitesDir="

...

    1. D:/OfflineSuite/Suite1"

    2. Environment Variable – Enter the environment variables and their associated values in the following format: java -jar qualitiaoffline-

...

    1. 9.

...

    1. 0.x.jar env.var1=value1 env.var2=value2

...

    1. . Here, var1 and var2 denote the environment variables, and value1 and value2 denote the associated values. For example, java -jar qualitiaoffline-9.0.x.jar env.username=john.smith env.password=12345

    2. Other Parameters defined in the selected Execution Profile – Enter the parameters preceded by their hierarchy in name=value format as command-line arguments. For example, to use a specific version of Google Chrome, enter the command line argument as follows - java -jar qualitiaoffline-9.0.x.jar googleChrome.version=81.0.1.36 . In this example, Google Chrome is the topmost parameter followed by its version. You may provide multiple property-value pairs separating them with space, as shown in the following example - java -jar qualitiaoffline-9.0.x.jar googleChrome.version=81.0.1.36 PageTimeoutInSeconds=10.

      1. If you are overriding the mapped execution profile, enter it as the first argument as this - java -jar qualitiaoffline-9.0.x.jar "D:/ABCsettings.JSON" googleChrome.version=81.0.1.36 PageTimeoutInSeconds=10

      2. If a key has a dot in its name, you need to put backslash before the dot, such as  chrome.chromedriverVersion, which is under Android Chrome as shown here -
        java -jar qualitiaoffline-

...

      1. 9.

...

      1. 0.x.

...

      1. jar androidChrome.chrome\.chromedriverVersion=83

  1. Press Enter to start the offline suite execution.Viewing an

View Offline Suite Execution Report

·       Use Case: After running the tests, you need would want to review a comprehensive report to analyze the results.·       Instantly

  • You can check the results on the Real Time Reporting Portal.

...

  • Additionally, the offline suite creates a detailed summary report based on the location set in the Qualitia Offline Configuration Manager

...

  • > General Settings tab.

...

  • You can manually upload the locally saved report, if it is not available on the Real-Time Reporting Portal

...

  1. Editing the Test Data for an Offline Suite

·       Use Case: Before re-running tests or for a different testing scenario, you might need to change some test data.

·       One way to modify is through the Qualitia Client:

...

  • for any of the following reasons:

    • Qualitia Server URL is not configured in the offline suite.

    • Connection to Qualitia Server fails during offline suite execution.

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

  1. Open your test case from the client.

...

  1. Access the Test Data explorer to edit.

...

  1. Once done, re-create the offline suite

...

  1. .

    1. 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 folder. But, using However, it is recommended to edit through the Qualitia Client is recommended as it provides error alerts for incorrect data modifications.

By following this guide, SDETs can efficiently set up, execute, review, and modify offline tests in QAS, ensuring a versatile and adaptable testing process.

 

 

Editing Test Data in Offline Suite Test Data File

 

Introduction:

Info

 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 . This guide simplifies the process for SDETs, ensuring that they can quickly and effectively adapt their test cases as needed.

Prerequisites:

·       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

·       Use Case: You want to quickly adjust test data without altering the structure of the file.

Note

...

  1. Don

...

  1. not add or remove columns, or change the column order.

...

  1. Use $NULL$ where you don

...

  1. not want to set a value for a parameter.

...

  1. Delete rows for unwanted task or test case (TC) iterations.

...

Steps to Modify Test Data for an Offline Suite

·       Use Case: You need to adjust the test scenarios based on new requirements.

...

  1. Go to the Offline Suite folder.

...

  1. Backup the test data file you

...

  1. want to edit.

...

  1. Open the test data Excel file.

·       From the third row, tweak values as needed. The first row shows tasks in grey, with the second row detailing their parameters.

...

  1. You can update the values for the below fields, as needed.

    1. TC Iteration: Shows the number for every TC Iteration. There must be at least one TC Iteration for executing the test case.

    2. Selection: Shows True for the enabled test case iterations; Otherwise, it shows False. You can modify the values only for test case iterations.

    3. DataSetTag: Optionally, enter a label for identifying the dataset in the test case execution report. You can modify the values.

  2. To add a TC iteration, insert a row with values for TC Iteration

...

  1. Number, Selection, and DataSetTag (optional).

...

  1. For adding a task iteration, insert a row with values for associated parameters.

...

  1. 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 run an offline suite execute an Offline Suite present in a shared drive for web and mobile applications in two one of the following ways: by

  • 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

...

·       Use Case: For a more seamless experience, you might prefer mapping the shared drive to your local system.·      

  1. Copy both the offline package and suite to the shared drive

...

  1. .

    1. Ensure you have the read and write permissions.

...

  1. Map this shared drive to your local computer.

...

  1. Update the offline suite settings, as

...

  1. required.

    1. For

...

    1. details, refer to Configuring the Settings for an Offline Suite

...

    1. .

...

  1. To execute, follow one of these approaches:

...

    1. Using the Command Prompt,

...

    1. go to the mapped location

...

    1. and execute the offline package with the right command.

...

      1. For details, refer to section Executing Offline Suite using CLI Commands.

    1. Open the mapped driver and simply double-click the offline package (

...

    1. 9.

...

    1. x.x jar)

...

By following this guide, SDETs can efficiently manage, adjust, and execute their test scenarios, ensuring accurate results even in offline or shared environments.

 

 

Executing Offline Suites & Integrating with CI Tools

 

Introduction:

This guide offers SDETs a clear path to execute offline suites stored on shared drives and integrate them with various Continuous Integration (CI) tools.

Prerequisites:

13. Familiarity with Qualitia Automation Studio (QAS).

14. Knowledge of Continuous Integration tools like Jenkins, TeamCity, and Bamboo.

15. Access to the offline package and suite for execution.

Process Flow:

  1. 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 8.6.x jarfile.

·       Note: Using the command prompt with the full UNC path for execution isn't supported.

  1. Running
    1. .

Execute a Shared Offline Suite Without Mapping

To execute a shared drive without mapping the shared drive to the local computer:

  1. Copy the offline package along with the offline suite to the shared drive.

    1. Ensure you have the read and write permissions.

  2. Open the shared location and double-click the offline package (9.x.x jar).

Info

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

...

Method: Local execution after mapping. Steps:

·       Before starting:

·       Install UFT on the computer meant for execution.

·       Map the shared drive locally.

·       Copy the offline package to the shared drive with appropriate permissions.

·       Ensure the TSR file is available and accessible.

·       Configure the offline suite. For more details, see "Configuring System Execution Profile for Desktop Projects".

·       Choose either:

·       Use the command prompt, navigate to the mapped drive with the offline package and suite, and initiate using commands.

...

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:

  1. Installed UFT on the same computer from where you will execute the offline suite.

  2. Mapped shared drive to local computer.

  3. Copied offline package to shared drive with read and write access.

  4. 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:

  1. Configure the offline suite as per the requirements. For detailed instructions, refer to Configuring the System Execution Profile Settings for a Desktop Project.

  2. Do one of the following: 

    • Open command prompt, navigate to mapped drive location that contains the offline package and offline suite.

    • 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:

  1. Copy both the offline package and suite to the shared drive, ensuring you have read/write permissions.

  2. Directly access the shared location and initiate the offline package by double-clicking on the

...

  1. 9.

...

  1. 0.x jar file.

Info

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. Steps:·      

  1. Ensure QAS's capability to integrate with CI tools like

    1. Jenkins

...

    1. TeamCity

...

    1. Bamboo.

...

  1. For mobile application tests, even though QAS hosts the Appium Server internally, use a custom Appium server for different Appium versions if needed.

...

  1. Set the CI_Tool property in the mapped execution profile before starting.

Headless Executions:

Method: Browser-based testing without GUI.

Steps:·      

  1. Recognize that headless executions run faster since they don't launch the browser UI. QAS supports this for Google Chrome and Mozilla Firefox.

...

  1. To execute tests in headless mode:

...

    1. Via QAS Client/OfflineConfigManager:

...

    1. Open the associated execution profile.

...

    1. Choose the browser.

...

    1. Activate the respective headless setting

...

    1. , via CLI:

...

      1. For Chrome: java -jar qualitiaoffline-xxxx.jar googleChrome.chromeOptions.args=--headless

...

      1. For Firefox: java -jar qualitiaoffline-xxxx.jar firefox.firefoxOptions.args=--headless

...

Info

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:19.

  1. Open the associated execution for a test suite.

...

  1. From the Browser list, select either Chrome or Firefox.

...

  1. Check the "Desired Capabilities" checkbox.

...

  1. Based on your browser choice:

...

    1. For Chrome:

...

      1. Select the chromeOptions checkbox.

...

      1. Check the args checkbox.

...

      1. Input --headless in the associated field.

...

    1. For Firefox:

...

      1. Select the firefoxOptions checkbox.

...

      1. Check the args checkbox.

...

      1. Input --headless in the associated field.

...

  1. Click

...

  1. Ok

...

  1. .

Method: CLI-based execution for headless mode.

Steps:24.

  1. Open the Command Prompt.

...

  1. Navigate to the directory containing the offline package.

...

  1. To run on Chrome, use:

...

  1. java -jar qualitiaoffline-xxxx.jar googleChrome.chromeOptions.args=--headless

...

  1. For Firefox execution, input:

...

  1. java -jar qualitiaoffline-xxxx.jar firefox.firefoxOptions.args=--headless

...

 

...