Deep Dive into HyperExecute YAML
This document contains detailed explanations for all YAML flags, providing an in-depth understanding of each configuration parameter.
Mandatory Parameters
version
The version of HyperExecute YAML being used to run the tests. Currently there are two supported versions are 0.1 and 0.2.
version: 0.1
runson
In this flag, you will define your required Operating System on which you want to run your tests.
Currently we support linux, mac (macOS Monterey), mac13 (macOS Ventura), win (Windows 10) and win11 (Windows 11).
runson: linux # mac, mac13, win, win11
If you want to run a multi OS job, you can use matrix method as shown below
runson: ${matrix.os}
matrix:
os: [linux, mac, mac13, win, win11]
pre
All actions you need to perform before each test execution, such as installing dependencies. You’ll ideally want to use this parameter to "pre" run simple commands like npm install, yarn install, mvn install etc
pre:
- npm install
- mvn install
📘 Refer to globalPre command to perform a common global setup for all your tasks, such as installing dependencies or configuring environments.
AutoSplit Mode Parameters
autosplit
Auto-Split mode automatically splits your scenarios among the concurrent number of tasks and executes them parallelly. This ensures optimal utilization of resources and significantly reduces the overall execution time of your test suite.
For instance, if you have a concurrency of 10 and you want to run 50 tests in total, AutoSplit mode will distribute these 50 tests on 10 VMs in the most efficient manner possible to reduce your overall job execution time.
Note: In
local mode, these commands will be smartly distributed among the VMs using history data, such that each VM (task) gets to run for almost the same amount of time to reduce your totaljobtime.
autosplit: true
📕 Take a closer look at the AutoSplit mode.
concurrency
This indicates the total number of concurrent sessions that can run in parallel for processing your test-cases. Your job will have as many virtual machines (tasks) as you have defined for this flag.
if you are using the AutoSplit strategy then it is mandatory for you to define the concurrency.
concurrency: 10
- After analyzing your test cases and usage patterns, the platform will automatically recommend the optimal concurrency settings tailored to your needs. These recommendations are displayed in the banner on the left-hand side. Learn more here.
- You can see the overall concurrency trends using our analytics widgets.
testDiscovery
This is used to locate or discover relevant tests via class names, filters, file names, etc.
testDiscovery:
type: raw
mode: local
command: grep 'public class' src/test/java/hyperexecute/*.java | awk '{print$3}'
It contains the following attributes:
type
#(Recommended). When we are passing a command to discover tests.
type: raw #or
#(Advanced). For more advanced use cases.
type: automatic
type: raw
- Purpose: Perform a basic test discovery based on the provided command.
- Functionality: Directly executes the specified command and displays the discovered tests.
- Limitations: Doesn't utilize any built-in logic or advanced discovery capabilities.
- Suitable for: Simple test discovery scenarios where the command directly identifies the desired tests.
type: automatic
- Purpose: Utilize backend logic to discover tests using external tools.
- Functionality: Relies on a backend tool, such as Snooper, to perform test discovery.
- Limitations: Cannot be used directly with a command-based approach.
- Suitable for: Complex test discovery scenarios where advanced logic or external tools are required.
In summary, type:raw is a basic and straightforward approach for discovering tests based on a specified command, while type:automatic provides more flexibility and advanced capabilities by leveraging external tools and backend logic.