Skip to content

Commit ab92714

Browse files
authored
Merge pull request #1020 from surishubham/main
Aman's PR 1007, 13, 16
2 parents 8274dd0 + 3e56f81 commit ab92714

File tree

1 file changed

+48
-13
lines changed

1 file changed

+48
-13
lines changed

docs/deep-dive-into-hyperexecute-yaml.md

Lines changed: 48 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ slug: deep-dive-into-hyperexecute-yaml/
1515

1616
import Tabs from '@theme/Tabs';
1717
import TabItem from '@theme/TabItem';
18+
import NewTag from '../src/component/newTag';
1819

1920
<script type="application/ld+json"
2021
dangerouslySetInnerHTML={{ __html: JSON.stringify({
@@ -89,7 +90,7 @@ Auto-Split mode automatically splits your [`scenarios`](/support/docs/hyperexecu
8990

9091
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.
9192

92-
> **Note:** In [`static mode`](/support/docs/deep-dive-into-hyperexecute-yaml/#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 total [`job`](/support/docs/hyperexecute-guided-walkthrough/#jobs-page) time.
93+
> **Note:** In [`local mode`](/support/docs/deep-dive-into-hyperexecute-yaml/#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 total [`job`](/support/docs/hyperexecute-guided-walkthrough/#jobs-page) time.
9394

9495
```yaml
9596
autosplit: true
@@ -119,7 +120,7 @@ This is used to locate or discover relevant tests via class names, filters, file
119120
```yaml
120121
testDiscovery:
121122
type: raw
122-
mode: dynamic
123+
mode: local
123124
command: grep 'public class' src/test/java/hyperexecute/*.java | awk '{print$3}'
124125
```
125126

@@ -130,17 +131,17 @@ It contains the following attributes:
130131
type: raw #or
131132
132133
#(Advanced). For more advanced use cases.
133-
type: automatic
134+
type: automatic
134135
```
135136

136-
**`type:raw`**
137+
**`type: raw`**
137138

138139
- **Purpose:** Perform a basic test discovery based on the provided command.
139140
- **Functionality:** Directly executes the specified command and displays the discovered tests.
140141
- **Limitations:** Doesn't utilize any built-in logic or advanced discovery capabilities.
141142
- **Suitable for:** Simple test discovery scenarios where the command directly identifies the desired tests.
142143

143-
**`type:automatic`**
144+
**`type: automatic`**
144145

145146
- **Purpose:** Utilize backend logic to discover tests using external tools.
146147
- **Functionality:** Relies on a backend tool, such as Snooper, to perform test discovery.
@@ -149,23 +150,57 @@ type: automatic
149150

150151
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.
151152

152-
#### `mode`
153+
#### `mode`
154+
This attribute defines where the test discovery occurs and how it is executed. HyperExecute now supports three discovery modes: `local`, and `remote`.
155+
153156
```yaml
154157
#test discovery happens on machine where CLI is running
155-
mode: static #or
158+
mode: local #or
156159
157-
#test discovery happens on HyperExecute VMs
158-
mode: dynamic
160+
# test discovery happens in designated HyperExecute VMs
161+
mode: remote
159162
```
163+
<!-- #test discovery happens on HyperExecute VMs
164+
mode: dynamic #or -->
165+
**`mode: local`**
166+
167+
- **Purpose:** Test discovery is performed locally on the machine where the CLI is running.
168+
- **Use Case:** Ideal for small projects or when tests need to be discovered locally.
169+
- **Limitations:** Requires dependencies installed locally and doesn’t support matrix-based distributions. Debugging logs are generated locally, limiting visibility.
170+
171+
<!-- **`mode: dynamic`**
172+
173+
- **Purpose:** Test discovery occurs on HyperExecute’s VMs during runtime, depending on the concurrency and OS settings.
174+
- **Use Case:** Suitable for scenarios where distributed test discovery is required across different VMs.
175+
- **Limitations:** Increases test execution time due to VM-level discovery. It also lacks efficient test distribution across VMs, and is incompatible with YAML 0.2 test discovery runners. -->
176+
177+
**`mode: remote`** <NewTag value="NEW" bgColor="#ffec02" color="#000" />
178+
179+
The `remote` discovery mode addresses the limitations of `local` modes. Instead of running test discovery on your local machine (local), this mode centralizes the process by using a dedicated remote Virtual Machines.
180+
181+
This setup helps to ease the discovery process and makes it more efficient, especially for complex test setups. Additionally, it fully supports [matrix-based testing](https://www.lambdatest.com/support/docs/hyperexecute-matrix-multiplexing-strategy/), which allows you to discover and manage tests across different configurations more effectively.
182+
183+
> **NOTE :** [`type`](/support/docs/deep-dive-into-hyperexecute-yaml/#type) is not required with remote discovery.
184+
185+
#### Key Features:
186+
- **Centralized Discovery Tasks:** Tests are discovered remotely in a Virtual Machines designed for this purpose. Discovery tasks focus solely on identifying the tests without executing them, optimizing the discovery process.
187+
188+
- **Orchestration Support:** Once tests are identified, orchestration algorithms ensure they are efficiently distributed across Virtual Machines, reducing idle time and improving resource utilization.
189+
190+
- **Matrix Support:** Fully supports matrix configurations, allowing individual test discovery for each matrix combination, particularly useful for YAML 0.2 runners.
191+
192+
- **Optimized Caching:** Remote Discovery Mode reduces redundant cache operations by performing them once in the discovery task, and sharing the cache across all Execution Tasks. This speeds up the overall process and minimizes resource wastage.
193+
194+
- **Code Caching:** For users cloning their codebase via Git, Remote Discovery caches the code during the discovery task, reducing Git rate limits and accelerating the execution tasks.
160195

161196
#### `command`
162-
The command that fetches the list of test scenario that would be further executed using the value passed in testRunnerCommand
197+
The command that fetches the list of test scenario that would be further executed using the value passed in `testRunnerCommand`
163198
```yaml
164199
command: grep 'public class' src/test/java/hyperexecute/*.java | awk '{print$3}'
165200
```
166201

167202
:::tip
168-
- Test orchestration will happen with [`mode: static`](/support/docs/deep-dive-into-hyperexecute-yaml/#mode) only.
203+
- Test orchestration will happen with [`mode: local`](/support/docs/deep-dive-into-hyperexecute-yaml/#mode) only.
169204
- 📕 Learn how to perform [dependent test discovery](/support/docs/hyperexecute-how-to-perform-dependent-test-based-discovery/).
170205
:::
171206

@@ -892,7 +927,7 @@ When running a test case, it tries to fetch from cache, which browser was used f
892927

893928
If you feel that browser setup time is more than expected, you should enable this feature. However, please note that it will reduce the browser setup time of the next test only if the current test takes enough time to launch the browser for the next test in background.
894929

895-
This would work only for `version 0.1` and static discovery mode.
930+
This would work only for `version 0.1` and local discovery mode.
896931

897932
As this is dependent on the previous run of a job, any change in the browser capability or test name or test order might render the cache invalid. And browser setup time reduction might not be visible in this run, rather, it would appear in the next run.
898933

@@ -1350,7 +1385,7 @@ When we run a job in matrix mode, we set the keys with their resolved value as e
13501385
***
13511386

13521387
### `dynamicAllocation`
1353-
When we set dynamicAllocation true, the test cases are distributed among parallels at the runtime. This is valid in case of static test discovery. In this case, the parallels are utilised in the most optimised manner.
1388+
When we set dynamicAllocation true, the test cases are distributed among parallels at the runtime. This is valid in case of local test discovery. In this case, the parallels are utilised in the most optimised manner.
13541389
<!-- **(Currently in BETA)** -->
13551390

13561391
```yaml

0 commit comments

Comments
 (0)