You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/deep-dive-into-hyperexecute-yaml.md
+66Lines changed: 66 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -617,6 +617,72 @@ The uploadArtefact flag is not currently supported for tests running with the **
617
617
618
618
***
619
619
620
+
### `globalPre`
621
+
> Currently, only **Linux OS** is supported
622
+
623
+
The `globalPre` flag allows you to define a pre-execution step that runs once before any task starts. This flag ensures that all necessary setup tasks, such as installing dependencies, configuring environments, or initializing resources, are completed before test execution begins.
624
+
625
+
#### Functionality
626
+
- Runs before any test execution starts, ensuring the environment is properly configured.
627
+
- Executed on a separate machine (VM) or the local machine, based on the [test discovery mode](/support/docs/deep-dive-into-hyperexecute-yaml/#mode) selected.
628
+
- Useful for setup tasks, such as fetching credentials, initializing databases, or downloading required files.
629
+
630
+
```yaml title="hyperexecute.yaml"
631
+
globalPre:
632
+
mode: remote #local or remote
633
+
commands:
634
+
- "echo 'Setting up environment'"
635
+
- "apt-get update && apt-get install -y curl"
636
+
- "curl -X POST https://api.example.com/init"
637
+
```
638
+
639
+
#### Parameters
640
+
| Parameter | Type | Description |
641
+
|-----------|------|-------------|
642
+
| mode | string | Defines where the pre-step commands will be executed. Options: local or remote. |
643
+
| commands | list | List of shell commands to execute before test execution begins. |
644
+
645
+
***
646
+
647
+
### `globalPost`
648
+
> Currently, only **Linux OS** is supported
649
+
650
+
The `globalPost` flag defines a post-execution step that runs once after all tasks have completed. This step ensures that cleanup tasks, such as removing temporary files, logging results, or notifying external systems, are performed after test execution.
651
+
652
+
#### Functionality
653
+
- Runs after all test execution is completed, ensuring final cleanup and reporting.
654
+
- Executed on a separate machine (VM) or the local machine, based on the mode selected.
655
+
- Useful for cleanup tasks, such as deleting test artifacts, summarizing reports, or deallocating cloud resources.
656
+
657
+
```yaml title="hyperexecute.yaml"
658
+
globalPost:
659
+
mode: remote #local or remote
660
+
commands:
661
+
- "echo 'Cleaning up test environment'"
662
+
- "rm -rf /tmp/test-results"
663
+
- "curl -X POST https://api.example.com/cleanup"
664
+
```
665
+
666
+
#### Parameters
667
+
| Parameter | Type | Description |
668
+
|-----------|------|-------------|
669
+
| mode | string | Defines where the post-step commands will be executed. Options: local or remote. |
670
+
| commands | list | List of shell commands to execute after test execution completes. |
671
+
672
+
#### Difference between `globalPre`/`globalPost` and `pre`/`post` flags
673
+
| Scenario | globalPre | globalPost | pre | post |
|Execution Scope | Runs once before all tasks | Runs once after all tasks | Runs before each individual task | Runs after each individual task |
676
+
|Execution Frequency | Executes once per entire test execution | Executes once after all tasks complete | Executes once per task | Executes once per task |
677
+
|Execution Location | Separate VM or local machine | Separate VM or local machine | Inside the task environment | Inside the task environment |
|Isolation | Runs in a dedicated VM (if remote) | Runs in a dedicated VM (if remote) | Runs in the same task environment | Runs in the same task environment |
680
+
|Configuration Placement | Defined globally in the YAML configuration | Defined globally in the YAML configuration | Defined within the task block | Defined within the task block|
Copy file name to clipboardExpand all lines: docs/hyperexecute-yaml-parameters.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -131,6 +131,8 @@ The **HyperExecute YAML** file serves as the foundational component for test exe
131
131
132
132
| Key | Type | Description|
133
133
|-----|------|------------|
134
+
|[globalPre](/support/docs/deep-dive-into-hyperexecute-yaml/#globalpre)| Map | This flag runs once before all tasks start, used for global setup such as installing dependencies or configuring environments. |
135
+
|[globalPost](/support/docs/deep-dive-into-hyperexecute-yaml/#globalpost)| Map | This flag runs once after all tasks finish, used for global cleanup such as removing logs or finalizing reports. |
134
136
|[failFast](/support/docs/deep-dive-into-hyperexecute-yaml/#failfast)| Map | Flag to fail a job faster if there are `x` consecutive failures. |
135
137
|[differentialUpload](/support/docs/deep-dive-into-hyperexecute-yaml/#differentialupload)| Map | Minimize the time of upload of code. |
136
138
|[background](/support/docs/deep-dive-into-hyperexecute-yaml/#background)| Map |It is used to trigger long-running Application Servers tasks like running WebApps or databases |
0 commit comments