Version 2.7.3
globalPre
and globalPost
flag in HyperExecute YAML
The globalPre
and globalPost
flags in the HyperExecute YAML configuration allow for global setup and teardown operations for test execution. These flags enable users to define commands that run before any tests begin (globalPre) and after all tests have completed (globalPost), providing greater control over test executions.
hyperexecute.yaml
# globalPre
globalPre:
mode: remote #local or remote
commands:
- "echo 'Setting up environment'"
- "apt-get update && apt-get install -y curl"
- "curl -X POST https://api.example.com/init"
runson: linux
# globalPost
globalPost:
mode: remote #local or remote
commands:
- "echo 'Cleaning up test environment'"
- "rm -rf /tmp/test-results"
- "curl -X POST https://api.example.com/cleanup"
runson: linux

📘 Refer to our detailed documentation for
globalPre
andglobalPost
flags.