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
+26-18Lines changed: 26 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -72,14 +72,16 @@ matrix:
72
72
***
73
73
74
74
### `pre`
75
-
All actions you need to perform before 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
75
+
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
76
76
77
77
```yaml
78
78
pre:
79
79
- npm install
80
80
- mvn install
81
81
```
82
82
83
+
>📘 Refer to [globalPre](/support/docs/deep-dive-into-hyperexecute-yaml/#globalpre) command to perform a common global setup for all your tasks, such as installing dependencies or configuring environments.
84
+
83
85
***
84
86
## AutoSplit Mode Parameters
85
87
@@ -482,14 +484,16 @@ maxRetries: 2
482
484
***
483
485
484
486
### `post`
485
-
This parameter is used for executing actions after all your tests are executed, such as printing an output file or uploading a report via a curl API request. It's ideal for performing post-run tasks.
487
+
This parameter is used for executing actions after every test execution, such as printing an output file or uploading a report via a curl API request. It's ideal for performing post-run tasks.
486
488
487
489
```yaml
488
490
post:
489
491
- echo <some-dir>/output/output.log
490
492
- curl https://www.example.com
491
493
```
492
494
495
+
>📘 Refer to [globalPost](/support/docs/deep-dive-into-hyperexecute-yaml/#globalpost) command to perform a common global setup for all your tasks, such as clean up tasks and or killing the environments.
496
+
493
497
***
494
498
495
499
### `report`
@@ -620,11 +624,11 @@ The uploadArtefact flag is not currently supported for tests running with the **
620
624
### `globalPre`
621
625
> Currently, only **Linux OS** is supported
622
626
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.
627
+
The `globalPre` flag allows you to define a pre-execution step that runs once before any of your tasks 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
628
625
629
#### Functionality
626
630
- 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.
631
+
- Executes 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
632
- Useful for setup tasks, such as fetching credentials, initializing databases, or downloading required files.
629
633
630
634
```yaml title="hyperexecute.yaml"
@@ -639,9 +643,17 @@ globalPre:
639
643
#### Parameters
640
644
| Parameter | Type | Description |
641
645
|-----------|------|-------------|
642
-
| mode | string | Defines where the pre-step commands will be executed. Options: local or remote. |
646
+
| mode | string | Defines where the pre-step commands will be executed. <br /> Options: [local or remote](/support/docs/deep-dive-into-hyperexecute-yaml/#mode). |
643
647
| commands | list | List of shell commands to execute before test execution begins. |
644
648
649
+
#### Difference between `globalPre` and `pre` flags
650
+
| Scenario | globalPre | pre |
651
+
|----------|-----------|-----|
652
+
|Purpose | Global setup (e.g., install dependencies, initialize environment) | Task-specific setup (e.g., prepare test data) |
653
+
|Execution Frequency | Executes once per entire test execution | Executes once per task |
654
+
|Execution Location | Separate VM or local machine | Inside the task environment |
@@ -651,7 +663,7 @@ The `globalPost` flag defines a post-execution step that runs once after all tas
651
663
652
664
#### Functionality
653
665
- 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.
666
+
- Executes on a separate machine (VM) or the local machine, based on the mode selected.
655
667
- Useful for cleanup tasks, such as deleting test artifacts, summarizing reports, or deallocating cloud resources.
656
668
657
669
```yaml title="hyperexecute.yaml"
@@ -666,20 +678,16 @@ globalPost:
666
678
#### Parameters
667
679
| Parameter | Type | Description |
668
680
|-----------|------|-------------|
669
-
| mode | string | Defines where the post-step commands will be executed. Options: local or remote. |
681
+
| mode | string | Defines where the post-step commands will be executed. <br /> Options: [local or remote](/support/docs/deep-dive-into-hyperexecute-yaml/#mode). |
670
682
| commands | list | List of shell commands to execute after test execution completes. |
671
683
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|
0 commit comments