File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,34 @@ Sets a timeout for the request.
145
145
req .setTimeout (5000 ); // Sets the timeout to 5000 milliseconds (5 seconds)
146
146
```
147
147
148
+ ### ` getExecutionMode `
149
+
150
+ Get the current active execution mode of the request.
151
+
152
+ ** Returns:**
153
+ - ` runner ` : When the request is being executed as part of a collection run
154
+ - ` standalone ` : When the request is being executed individually
155
+
156
+ ** Example:**
157
+ ``` javascript
158
+ const executionMode = req .getExecutionMode ();
159
+ console .log (` Request is running in ${ executionMode} mode` );
160
+ ```
161
+
162
+ ### ` getExecutionPlatform `
163
+
164
+ Get the platform on which the request is being executed.
165
+
166
+ ** Returns:**
167
+ - ` app ` : When running in the Bruno desktop application
168
+ - ` cli ` : When running through the Bruno CLI
169
+
170
+ ** Example:**
171
+ ``` javascript
172
+ const platform = req .getExecutionPlatform ();
173
+ console .log (` Request is running on ${ platform} platform` );
174
+ ```
175
+
148
176
## Response
149
177
150
178
This ` res ` variable is available inside your scripting and testing context.
You can’t perform that action at this time.
0 commit comments