Skip to content

Commit e6560af

Browse files
committed
chore: update docs
1 parent 5de7d70 commit e6560af

File tree

7 files changed

+27
-14
lines changed

7 files changed

+27
-14
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Bridge the testing gap: Jest-style tests in real native environments. Get the co
1313

1414
- **Jest-Style Syntax, Native Power**: Write familiar describe/it tests that run in real iOS and Android environments with full native module access.
1515
- **Best of Both Worlds**: Unlike Jest (Node.js only) or Maestro (UI-based), get convenient test syntax AND native environment execution.
16-
- **Real Device & Simulator Testing**: Execute tests directly on iOS simulators and Android emulators — catch platform-specific issues Jest can't see.
16+
- **Real Device, Simulator & Web Testing**: Execute tests on iOS simulators, Android emulators, or in a browser (Web) — catch platform-specific issues Jest can't see.
1717
- **Native Module Testing**: Test native modules, platform APIs, and device-specific functionality that's impossible with JavaScript-only runners.
1818
- **Familiar Test Structure**: Use beforeEach, afterEach, describe, it, expect — all the testing patterns you know and love from Jest.
1919
- **Zero Configuration Setup**: Drop-in replacement for your existing test workflow with TypeScript support and seamless CI/CD integration.
@@ -60,8 +60,10 @@ export default config;
6060
The documentation is available at [react-native-harness.dev](https://react-native-harness.dev). You can also use the following links to jump to specific topics:
6161

6262
- [Quick Start](https://react-native-harness.dev/docs/getting-started/quick-start)
63+
- [Configuration](https://react-native-harness.dev/docs/getting-started/configuration) (Metro port, plugins, timeouts, coverage, and more)
6364
- [Problem Statement](https://react-native-harness.dev/docs/getting-started/problem-statement)
6465
- [Feature Comparison](https://react-native-harness.dev/docs/feature-comparison)
66+
- [Running in CI/CD](https://react-native-harness.dev/docs/guides/ci-cd)
6567
- [API Reference](https://react-native-harness.dev/docs/api/defining-tests)
6668

6769
## Made with ❤️ at Callstack

packages/github-action/README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@ GitHub Action that simplifies running React Native Harness tests in CI/CD enviro
1010

1111
## Action
1212

13-
Use:
13+
Pin the action ref to the **same release as the `react-native-harness` package** in your project’s `package.json` (for example `1.0.0` in dependencies → `@v1.0.0` on the action). The action and npm releases are cut from the same repo; keeping versions aligned avoids drift between what `pnpm install` / `npm ci` resolves and what the workflow runs.
14+
15+
Use a [release tag](https://github.com/callstackincubator/react-native-harness/releases) for normal CI, or `@main` only if you intentionally track the default branch.
1416

1517
```yaml
16-
- uses: callstackincubator/react-native-harness@main
18+
# Match @v… to the react-native-harness version in package.json
19+
- uses: callstackincubator/react-native-harness@v1.0.0
1720
```
1821
1922
The action reads your `rn-harness.config.mjs` file, resolves the `runner` you pass in, and uses that runner's `platformId` to decide which platform-specific setup to execute.
@@ -52,15 +55,15 @@ Hook behavior:
5255

5356
Runner configuration requirements:
5457

55-
- Android runners must include an `avd` property with `apiLevel`, `profile`, `diskSize`, and `heapSize`
58+
- Android **emulator** runners must include an `avd` property with `apiLevel`, `profile`, `diskSize`, and `heapSize` (the composite action fails fast if this is missing). Physical Android device runners do not use `avd`.
5659
- iOS runners must include a `device` property with `name` and `systemVersion`
5760

5861
## Examples
5962

6063
### Android runner
6164

6265
```yaml
63-
- uses: callstackincubator/react-native-harness@main
66+
- uses: callstackincubator/react-native-harness@v1.0.0
6467
with:
6568
app: './android/app/build/outputs/apk/debug/app-debug.apk'
6669
runner: 'android'
@@ -77,7 +80,7 @@ Runner configuration requirements:
7780
### iOS runner
7881

7982
```yaml
80-
- uses: callstackincubator/react-native-harness@main
83+
- uses: callstackincubator/react-native-harness@v1.0.0
8184
with:
8285
app: './ios/build/Build/Products/Debug-iphonesimulator/MyApp.app'
8386
runner: 'ios'
@@ -91,7 +94,7 @@ Runner configuration requirements:
9194
### Web runner
9295

9396
```yaml
94-
- uses: callstackincubator/react-native-harness@main
97+
- uses: callstackincubator/react-native-harness@v1.0.0
9598
with:
9699
runner: 'chromium'
97100
projectRoot: './apps/my-app'

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ Harness treats `metroPort` as the preferred starting port. If that port is alrea
117117
Physical iOS devices are the exception: they always use the default Metro port and do not support custom or fallback ports.
118118

119119
When multiple Harness runs target the same device, simulator, emulator, or browser configuration, Harness waits for the existing run to finish before starting the next one.
120+
121+
When a run finishes, Harness clears platform-specific dev settings it applied for the session (for example the Android debug HTTP host override and the iOS simulator JS location override) so your next normal Metro or dev-client launch is not stuck pointing at Harness's port.
120122
:::
121123

122124
A test runner defines how tests are executed on a specific platform. React Native Harness uses platform-specific packages to create runners with type-safe configurations.

website/src/docs/getting-started/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Before diving deep into React Native Harness and introducing it into your projec
44

55
## What is React Native Harness?
66

7-
React Native Harness is a testing tool for testing native modules in their native environments (Android, iOS) in a convenient way, using well-known Jest/Vitest syntax. Unlike traditional Jest tests that run in Node.js without access to native functionality, Harness executes your tests directly on real devices and simulators where native modules are available.
7+
React Native Harness is a testing tool for exercising native and web code in real environments (Android, iOS, and Web via the browser) in a convenient way, using well-known Jest/Vitest syntax. Unlike traditional Jest tests that run in Node.js without access to native functionality, Harness executes your tests directly on real devices and simulators where native modules are available.
88

99
For a detailed explanation of the problems with current testing approaches and how Harness solves them, see [Problem Statement](/docs/getting-started/problem-statement).
1010

website/src/docs/guides/ci-cd.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ React Native Harness provides an official GitHub Action that simplifies running
1919
- `callstackincubator/react-native-harness`
2020

2121
:::tip Versioning
22-
You can pin to a specific version by appending `@<version>` to the action path (e.g., `@main`, `@v1.0.0`). For production use, we recommend pinning to a specific release tag once available.
22+
Pin the action to the **same [release tag](https://github.com/callstackincubator/react-native-harness/releases) as the `react-native-harness` version in your `package.json`** (for example package `1.0.0``uses: callstackincubator/react-native-harness@v1.0.0`). The composite action and the npm package are released together; matching them avoids subtle mismatches between CLI behavior and the workflow steps.
2323
:::
2424

2525
The action automatically:
@@ -30,7 +30,7 @@ The action automatically:
3030
- Runs the tests
3131
- Uploads crash reports from `.harness/crash-reports/` as workflow artifacts whenever a run produces them
3232

33-
The action reads your `rn-harness.config.mjs` file to determine the selected runner's platform and device configuration, so you don't need to hardcode emulator or simulator settings in your workflow.
33+
The action reads your `rn-harness.config.mjs` file to determine the selected runner's platform and device configuration, so you don't need to duplicate emulator or simulator settings in your workflow. For **Android emulator** runners, the action still requires a full `avd` block in that config (see the [Android platform guide](/docs/platforms/android)).
3434

3535
### Action Inputs
3636

@@ -135,8 +135,9 @@ jobs:
135135
path: android/app/build/outputs/apk/debug/app-debug.apk
136136
key: android-app-${{ hashFiles('android/**/*.gradle*', 'android/**/gradle-wrapper.properties') }}
137137

138+
# Keep @v… in sync with the react-native-harness version in package.json
138139
- name: Run React Native Harness
139-
uses: callstackincubator/react-native-harness@main
140+
uses: callstackincubator/react-native-harness@v1.0.0
140141
with:
141142
app: android/app/build/outputs/apk/debug/app-debug.apk
142143
runner: android
@@ -209,8 +210,9 @@ jobs:
209210
path: ios/build/Build/Products/Debug-iphonesimulator/YourApp.app
210211
key: ios-app-${{ hashFiles('ios/Podfile.lock', 'ios/**/*.pbxproj') }}
211212

213+
# Keep @v… in sync with the react-native-harness version in package.json
212214
- name: Run React Native Harness
213-
uses: callstackincubator/react-native-harness@main
215+
uses: callstackincubator/react-native-harness@v1.0.0
214216
with:
215217
app: ios/build/Build/Products/Debug-iphonesimulator/YourApp.app
216218
runner: ios

website/src/docs/platforms/android.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,11 @@ The first argument is the manufacturer, and the second is the model name. These
107107

108108
## CI Notes
109109

110-
If you use the official GitHub Action with an Android emulator runner, `cacheAvd` works best when your runner includes the emulator's AVD configuration. This helps the action reuse the correct emulator snapshot between runs.
110+
:::caution Official GitHub Action + Android emulator
111+
The unified action [`callstackincubator/react-native-harness`](https://github.com/callstackincubator/react-native-harness) **requires** a full `avd` configuration on **emulator** runners (`apiLevel`, `profile`, `diskSize`, `heapSize`). It validates this before booting the emulator. Local CLI runs can target an emulator by name alone; the action needs the structured `avd` object to create or restore the AVD in CI.
112+
:::
113+
114+
If you use that action with an Android emulator runner, `cacheAvd` works best when your runner includes the emulator's AVD configuration. This helps the action reuse the correct emulator snapshot between runs.
111115

112116
## App Launch Options
113117

website/src/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ features:
2424
details: Write tests using familiar describe, it, expect, beforeEach, and afterEach syntax. No new testing patterns to learn.
2525
icon: <img src="/icons/speed-fast.svg" />
2626
- title: Truly native environment
27-
details: Execute tests directly on iOS simulators and Android emulators where native modules are fully available without mocking.
27+
details: Execute tests on iOS simulators, Android emulators, or in a real browser (Web), with native modules available where the platform provides them.
2828
icon: <img src="/icons/device-phone.svg" />
2929
- title: Quick integration
3030
details: Add to existing projects with straightforward configuration steps, TypeScript support and CI/CD compatibility.

0 commit comments

Comments
 (0)