Skip to main content

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
cmd

📘 Refer to our detailed documentation for globalPre and globalPost flags.

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

Book Demo

Help and Support

Related Articles