Skip to content

Example of running Katalon Studio on LambdaTest HyperExecute. Includes dynamic test suite splitting for parallel execution and Extent report generation for report consolidation.

Notifications You must be signed in to change notification settings

katalon-studio-samples/healthcare-hyperexecute

Repository files navigation

Katalon Studio on LambdaTest Hyperexecute

This project is an example of how to run Katalon Studio tests on LambdaTest Hyperexecute. It demonstrates splitting tests and running them in parallel to optimize execution time. The project also uses a Katalon Studio plugin to provide Extent format reporting, allowing reports to be consolidated by Hyperexecute.

Features

  • Parallel Test Execution: Tests are split and executed in parallel to reduce overall test execution time.
  • Extent Reports: Uses Extent binary format for detailed and consolidated reporting.
  • LambdaTest Hyperexecute: Leverages LambdaTest's Hyperexecute for efficient test execution.

Prerequisites

The following are required to run this example:

Running the Tests

  1. Clone this repository.
  2. Download the HyperExecute CLI.
  3. Add your LambdaTest credentials to the environment:
    • LT_USERNAME: Your LambdaTest username.
    • LT_ACCESS_KEY: Your LambdaTest access key.
  4. Add your Katalon Studio API key to the environment:
    • KATALON_API_KEY: Your Katalon Studio API key.
  5. Run the hyperexecute command to execute the tests

The hyperexecute.yaml configuration

The hyperexecute.yaml file contains the configuration for the Hyperexecute execution. The following sections describe the configuration options used in this project:

General Configuration

version: 0.1
globalTimeout: 90
testSuiteTimeout: 90
testSuiteStep: 90
retryOnFailure: false
maxRetries: 1
runson: windows

Artifacts

The mergeArtifacts option is used to merge the artifacts generated by the tests. The uploadArtefacts option is used to specify the artifacts to be uploaded. For this test, we upload both native Katalon reports and the Extent reports generated by the plugin.

mergeArtifacts: true
uploadArtefacts:
  - name: Katalon Reports
    path:
      - Reports/**
  - name: Extent Reports
    path:
      - Extent/**

Partial Reports

The partialReports section is used to specify the partial reports generated by the tests. The location option specifies the location of the partial reports, and the type option specifies the format of the partial reports. The frameworkName option specifies the name of the framework used to generate the partial reports.

This configuration is crucial for enabling Hyperexecute to consolidate the partial reports generated by the tests running across nodes.

report: true
partialReports:
  location: Extent
  type: json
  frameworkName: extent-native

Concurrency, Autosplit, and Test Discovery

The concurrency option specifies the number of parallel test executions. The autosplit option is used to split the tests dynamically. The testDiscovery section is used to specify the test discovery mode and command.

The project configuration uses a concurrency of 2 but can be scaled up based on the available resources.

The test discovery mode is set to raw, and the command is used to execute the tests dynamically. The command echo TC1 & echo TC2 & echo TC3 is used to simulate the dynamic test discovery. In a real-world scenario, the command would be replaced with a more elaborate test discovery mechanism.

autosplit: true
concurrency: 2
testDiscovery:
  type: raw
  mode: dynamic
  command: echo TC1 & echo TC2 & echo TC3

Test Runner Command

testRunnerCommand: katalonc `-noSplash `-runMode=console `-projectPath="D:\foreman\Hyperexecute_Healthcare\test.prj" `-retry=0 `-testSuitePath="Test Suites/Dynamic Test Suite" `-browserType="Chrome" `-executionProfile="default" `-apiKey="${KATALON_API_KEY}" `-`-config `-webui.autoUpdateDrivers=true `-testSuiteQuery="name=($test)"

Reporting

The test results are generated in the Extent JSON and HTML format. The JSON format can be consolidated using LambdaTest Hyperexecute's reporting tools.

Healthcare Sample App

The Katalon tests in this project are based on the Katalon Healthcare app sample. Navigate to https://docs.katalon.com/katalon-studio/docs/health-care-prj.html for further details.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Example of running Katalon Studio on LambdaTest HyperExecute. Includes dynamic test suite splitting for parallel execution and Extent report generation for report consolidation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published