Header

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 3 Next »

Introduction: For Software Development Engineers in Test (SDET), executing tests offline provides flexibility, especially when there's no immediate access to the main software or in environments with limited connectivity. This guide will walk you through the process of working with offline suites in the Qualitia Automation Studio (QAS) using CLI commands.

 

📚Prerequisites:

  • Access to the Qualitia Automation Studio (QAS) Client.

  • An offline package saved on your computer.

  • Basic familiarity with Command Line Interface (CLI) operations.

🔂 Process Flow:

Executing Offline Suite using CLI Commands

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

  1. open the Command Prompt.

  2. Navigate to the location of your saved offline package.

  3. Input: java -jar qualitiaoffline-8.6.x.jar to execute the offline package with the default settings.

  4. However, if you wish to override certain settings:

    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.

      2. It must be the first argument. For example: java -jar qualitiaoffline-8.6.x.jar "D:/ABCsettings.JSON"

    2. Offline Suite: Enter the location of the offline suite as SuitesDir="Suite_Path". For example, java -jar qualitiaoffline-8.6.x.jar SuitesDir="D:/OfflineSuite/Suite1

    3. Environment Variable: Enter environment variables and their associated values in the format java -jar qualitiaoffline-8.6.x.jar env.var1=value1 env.var2=value2. Here var1 and var2 denote environment variables, and value1 and value2 denote the associated values. For example, java -jar qualitiaoffline-8.6.x.jar env.username=john.smith env.password=12345

    4. 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-8.6.x.jar googleChrome.version=81.0.1.36 In this example, googleChrome is the topmost parameter and then version. You can provide multiple property=value pairs separating them with space, as shown in the following example:
      java -jar qualitiaoffline-8.6.x.jar googleChrome.version=81.0.1.36 PageTimeoutInSeconds=10

      If you are overriding the mapped execution profile enter it as the first argument, as shown in the following example:

      java -jar qualitiaoffline-8.6.x.jar "D:/ABCsettings.JSON" googleChrome.version=81.0.1.36 PageTimeoutInSeconds=10

      If a key has a dot in its name, you need to put backslash before the dot such as chrome.chromedriverVersion, which is under androidChrome, as shown in the following example:
      java -jar qualitiaoffline-8.6.x.jar androidChrome.chrome\.chromedriverVersion=83

  5. Press Enter to initiate the offline suite execution.

Viewing an Offline Suite Execution Report

After running the tests, you need a comprehensive report to analyze the results.

  • Instantly 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's General Settings tab.

  • If the report isn't available on the Real Time Reporting Portal after completion, because of

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

    • Connection to Qualitia Server fails during offline suite execution.

you can manually upload the locally saved report.

Editing the Test Data for an Offline Suite

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:

  1. Open your test case from the client.

  2. Access the Test Data Explorer to edit.

  3. After changes, recreate the offline suite. Refer to the section Work with Offline Packages.

Alternatively, you can also edit the test data directly in the Excel file located in the Offline Suite Folder. But, using the Qualitia Client is recommended as it provides error alerts for incorrect data modifications.

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

 Qualitia recommends using the Qualitia Client because it displays ❌ error message when change in test data is incorrect.

 

Editing Test Data in Offline Suite Test Data File

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 you, ensuring that they can quickly and effectively adapt their test cases as needed.

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.

  1. Don't add or remove columns, or change the column order.

  2. Use $NULL$ where you don't want to set a value for a parameter.

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

Steps to Modify Test Data for an Offline Suite

  1. Go to the offline suite folder.

  2. Backup the test data file you'll edit.

  3. Open the test data Excel file.

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

    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 as True or False for the enabled or disabled iterations. You can modify the values. This is applicable for TC iterations only.

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

  5. To add a TC iteration, insert a row with values for TC Iteration Number, Selection, and DataSetTag (optional).

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

  7. Save the Excel file after editing.

Executing Offline Suite on a Shared Drive

You want to execute tests located in a shared location, either for collaborative purposes or due to infrastructure constraints. You can run an offline suite in a shared drive for web and mobile applications in two ways: by mapping the shared drive to a local computer or without mapping.

Executing a Shared Offline Suite by Mapping the Shared Drive

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 ensuring you have read and write permissions.

  2. Map this shared drive to your local computer.

  3. Adjust the offline suite settings as needed. For a detailed guide, look into Configuring the Settings for an Offline Suite.

  4. To execute: Use the Command Prompt, navigate to the mapped location, and execute the offline package with the right command. Refer to section Executing Offline Suite using CLI Commands.

  5. Or simply double-click the offline package (9.x.x jar) in the mapped drive.

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

 

 Executing a Shared Offline Suite Without Mapping the Shared Drive to the Local Computer

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 with read and write access.

  2. 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).

Offline Suite Execution 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:

  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).

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.

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

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.

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

    1. Jenkins

    2. TeamCity

    3. Bamboo.

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

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

16. Open the associated execution profile.

17. Choose the browser.

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

19. Open the associated execution for a test suite.

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

21. Check the "Desired Capabilities" checkbox.

22. 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.

23. Click "Ok".

Method: CLI-based execution for headless mode.

Steps:

24. Open the Command Prompt.

25. Navigate to the directory containing the offline package.

26. To run on Chrome, use:

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

27. For Firefox execution, input:

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

 

 In conclusion, this guide ensures that SDETs have the tools and knowledge to execute offline suites, integrate with CI tools, and utilize headless executions effectively.

  • No labels