For AI agents and LLMs: a machine-readable index is available at llms.txt. A plain-Markdown version of any documentation page is available by appending .md to its URL.
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, maven/spock, gradle/testng, gradle/junit4, gradle/junit5, gradle/spock, 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".
discoveryModeStringNoSpecifies where the test discovery runs. Supported values are "local" and "remote".
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.
artifactsBooleanNoSpecifies whether to generate artifacts or not
languageStringNoSpecifies the device’s system language for the test session. This determines the language in which your app’s UI and strings will be displayed.
localeStringNoDefines the regional format settings such as date, time, currency, and number conventions.
mitmProxyBooleanNoCapture network logs directly from emulator sessions using MITM.

name​

Specifies the testing framework used in your repository.

Verified
framework:
name: "maven/testng"

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

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

Both Maven and Gradle build tools are supported for the Java runners:

RunnerBuild toolTest framework
maven/testngMavenTestNG
maven/junit4MavenJUnit 4
maven/junit5MavenJUnit 5
maven/spockMavenSpock
gradle/testngGradleTestNG
gradle/junit4GradleJUnit 4
gradle/junit5GradleJUnit 5
gradle/spockGradleSpock
Verified
framework:
name: gradle/testng
Prerequisites for the Gradle runners
  • Gradle 7.0 or higher and JDK 8 or higher.
  • Apply the java plugin in your build.gradle.
  • For gradle/spock, also apply the groovy plugin, since Spock specifications are written in Groovy.

flags​

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

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

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

runnerFlags​

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

Verified
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".

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

discoveryMode​

Specifies where the test discovery runs. Supported values are local and remote.

  • local: Test discovery runs on the same machine as the HyperExecute CLI and needs the framework dependencies available locally.
  • remote: Test discovery runs on a dedicated remote Virtual Machine instead of your local machine. This centralizes discovery, shares the cache across execution tasks, and removes the need to install the framework dependencies locally. See discovery modes for more details.
Verified
framework:
name: gradle/testng
discoveryMode: remote
info

Remote discovery is supported for all Java runners: maven/testng, maven/junit4, maven/junit5, maven/spock, gradle/testng, gradle/junit4, gradle/junit5, and gradle/spock.

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.

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

defaultReports​

Specifies whether to create default reports for the specified framework.

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

Verified
framework:
args:
region: us

artifacts​

To generate artifacts for your Espresso tests, add the artifacts: true flag in your YAML file:

Verified
framework:
args:
artifacts: true

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

language​

Specifies the device’s system language for the test session. This determines the language in which your app’s UI and strings will be displayed.

Verified
framework:
args:
language: es

locale​

Defines the regional format settings such as date, time, currency, and number conventions.

Verified
framework:
args:
locale: ES

mitmProxy​

You can now capture network logs directly from emulator sessions using MITM. This enhancement enables deeper debugging of API calls, request/response payloads, and overall network traffic during test execution.

Verified
framework:
args:
mitmProxy: true

Sample Yaml Version 0.2​

Verified
---
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
discoveryMode: remote
workingDirectory: src/main
defaultReports: false
args:
region: ap
language: es
locale: es
mitmProxy: true

retryOnFailure: true
maxRetries: 1

post:
- ls target/surefire-reports/

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

Terminal First Testing With Kane CLI

Natural language browser & mobile app tests right from terminal.

×
Schedule Your Personal Demo
Kane CLI terminal

Help and Support

Related Articles