Skip to content

Commit 9973499

Browse files
committed
docs: update website
1 parent 201ea14 commit 9973499

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

website/src/docs/getting-started/configuration.mdx

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ For Expo projects, the `entryPoint` should be set to the path specified in the `
9393
// Optional: Bridge timeout in milliseconds (default: 60000)
9494
bridgeTimeout?: number;
9595

96+
// Optional: Bundle start timeout in milliseconds (default: 15000)
97+
bundleStartTimeout?: number;
98+
99+
// Optional: Maximum number of app restarts when app fails to report ready (default: 2)
100+
maxAppRestarts?: number;
101+
96102
// Optional: Reset environment between test files (default: true)
97103
resetEnvironmentBetweenTestFiles?: boolean;
98104
}
@@ -249,6 +255,39 @@ Increase this value if you experience timeout errors, especially on:
249255
- Slower devices or simulators
250256
- Complex test suites with heavy setup
251257

258+
## Bundle Start Timeout
259+
260+
The bundle start timeout controls how long React Native Harness waits for Metro to start bundling after the app is restarted. This timeout is used in conjunction with the app restart mechanism to detect when an app has failed to report ready.
261+
262+
```javascript
263+
{
264+
bundleStartTimeout: 30000, // 30 seconds in milliseconds
265+
}
266+
```
267+
268+
**Default:** 15000 (15 seconds)
269+
**Minimum:** 1000 (1 second)
270+
271+
This timeout works with the `maxAppRestarts` setting to automatically restart the app when it fails to communicate with the test harness. If no bundling activity is detected within this timeout period, the app will be restarted automatically.
272+
273+
## Maximum App Restarts
274+
275+
The maximum app restarts setting controls how many times React Native Harness will attempt to restart the app when it fails to report ready within the configured timeout periods.
276+
277+
```javascript
278+
{
279+
maxAppRestarts: 3, // Allow up to 3 restart attempts
280+
}
281+
```
282+
283+
**Default:** 2
284+
**Minimum:** 0
285+
286+
When set to 0, automatic app restarting is disabled. Higher values provide more resilience against flaky test environments but may increase test execution time. The app will be restarted when:
287+
288+
- No bundling activity is detected within the `bundleStartTimeout` period
289+
- The bridge fails to establish communication within the `bridgeTimeout` period
290+
252291
## Environment-Specific Configurations
253292

254293
You can create different configurations for different environments:

0 commit comments

Comments
 (0)