Skip to main content

HyperExecute Yaml Version 0.2

This version introduces several new features and improvements over Version 0.1. This documentation outlines the changes and provides guidance on when to use Version 0.2 instead of Version 0.1.

info
  • Currently supported frameworks are maven/testng, maven/junit4, maven/junit5, wdio/mocha, and wdio/jasmine framework.
  • Version 0.2 supports all the fields available in Version 0.1, except for testDiscovery and testRunnerCommand
  • The new framework flag has been introduced to configure the test framework.

Why to use HyperExecute YAML Version 0.2?

  • The new framework feature supports caching by default. You do not have to specify any directories to cache for faster performance. If you adds the cacheKey and cacheDirectories keys in your yaml, the default caching gets disabled and preference is given to user specified cache.
  • In Version 0.2, the support for matrix mode has been removed, and only static discovery is available. This means that the discovery command will run on your system rather than in a matrix.
  • Since the support for testRunnerCommand is removed, the test orchestration will be managed automatically.

framework

The framework field in Hyperexecute YAML Version 0.2 allows you to configure the test framework settings. It provides more flexibility and customization options for your testing needs with the following parameters.

ParametersTypeMandatoryDescription
nameStringYesYou need to specify which testing framework you are using in your repo.
flagsArrayNoCommand line flags to pass to the custom runner for both test discovery and execution.
discoveryFlagsArrayNoCommand line flags to pass to the custom runner for test discovery only.
runnerFlagsArrayNoCommand line flags to pass to the custom runner for test execution only.
discoveryTypeStringNoSpecifies the type of test discovery to use. Supported values are "method" and "class". The default is "method".
workingDirectoryStringNoSpecifies the working directory where all discovery and execution commands will be executed.
defaultReportsBooleanNoSpecifies whether to create default reports for the specified framework.
regionStringNoSpecifies in which region you want to spin your appium tests.

name

Specifies the testing framework used in your repository.

framework:
name: "maven/testng"

To enable maven runner with Appium, you have to pass appium: true before the framework field

appium: true
framework: 
  name: "maven/testng"

flags

Specifies the command line flags to pass to the custom runner for both test discovery and execution.

framework:
name: "maven/testng"
flags: ["-Dplatname=win", "-Dgroups=selenium-test"]

discoveryFlags

Specifies the command line flags to pass to the custom runner for test discovery only.

framework:
name: "maven/testng"
discoveryFlags: ["-Dgroups=selenium-test"]

runnerFlags

Specifies the command line flags to pass to the custom runner for test execution only.

framework:
name: "maven/testng"
runnerFlags: ["-Dgroups=database"]

discoveryType

Specifies the level at which user wants to discover the tests. Supported values are "method" and "class". The default is "method".

framework:
name: maven/testng
discoveryType: method
# instead of method you can also use xmltest or class as a discovery type
flags:
- "-Dplatname=win"
info
  • For maven/testng the supported discovery types are method, class and xmltest. The default is method.
  • For maven/junit4 and maven/junit5 the supported discovery types are method and class. The default is method.
  • For wdio/mocha and wdio/jasmine the supported discovery types are test, spec, suite and wdiosuite. The default is spec.

workingDirectory

The working directory specifies the location of the directory in which all test discovery and execution commands will be run, as well as the location of any files or directories that are created as a result of the command execution. If the workingDirectory option is not specified, then the working directory will be the directory where the YAML file is located.

framework:
name: maven/testng
discoveryType: method
workingDirectory: src/main
flags:
- "-Dplatname=win"

defaultReports

Specifies whether to create default reports for the specified framework.

framework:
name: maven/testng
defaultReports: false
flags:
- "-Dplatname=win"

region

The region parameter specifies the region or location where the Appium tests will be executed. Our platform supports the following three regions:

  • ap (Asia-Pacific)
  • us (United States)
  • eu (European Union)

The region parameter should always be defined under the args parameter, as shown in the below sample code.

framework:
args:
region: us

📕 Learn how to perform group-based test discovery in TestNG

Sample Yaml Version 0.2

---
version: 0.2
runson: win

autosplit: true
concurrency: 2

pre:
# Skip execution of the tests in the pre step
- mvn dependency:resolve

framework:
name: maven/testng
flags:
- "-Dplatname=win"
discoveryFlags: ["-Dgroups=selenium-test"]
runnerFlags: ["-Dgroups=database"]
discoveryType: method
workingDirectory: src/main
defaultReports: false
args:
region: us

retryOnFailure: true
maxRetries: 1

post:
- ls target/surefire-reports/

mergeArtifacts: true
uploadArtefacts:
- name: ExecutionSnapshots
path:
- target/surefire-reports/html/**

Test across 3000+ combinations of browsers, real devices & OS.

Book Demo

Help and Support

Related Articles