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: README.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ Bridge the testing gap: Jest-style tests in real native environments. Get the co
13
13
14
14
-**Jest-Style Syntax, Native Power**: Write familiar describe/it tests that run in real iOS and Android environments with full native module access.
15
15
-**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.
17
17
-**Native Module Testing**: Test native modules, platform APIs, and device-specific functionality that's impossible with JavaScript-only runners.
18
18
-**Familiar Test Structure**: Use beforeEach, afterEach, describe, it, expect — all the testing patterns you know and love from Jest.
19
19
-**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;
60
60
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:
Copy file name to clipboardExpand all lines: packages/github-action/README.md
+9-6Lines changed: 9 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,10 +10,13 @@ GitHub Action that simplifies running React Native Harness tests in CI/CD enviro
10
10
11
11
## Action
12
12
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.
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:
52
55
53
56
Runner configuration requirements:
54
57
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`.
56
59
- iOS runners must include a `device` property with `name` and `systemVersion`
Copy file name to clipboardExpand all lines: website/src/docs/getting-started/configuration.mdx
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -117,6 +117,8 @@ Harness treats `metroPort` as the preferred starting port. If that port is alrea
117
117
Physical iOS devices are the exception: they always use the default Metro port and do not support custom or fallback ports.
118
118
119
119
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.
120
122
:::
121
123
122
124
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.
Copy file name to clipboardExpand all lines: website/src/docs/getting-started/introduction.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ Before diving deep into React Native Harness and introducing it into your projec
4
4
5
5
## What is React Native Harness?
6
6
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.
8
8
9
9
For a detailed explanation of the problems with current testing approaches and how Harness solves them, see [Problem Statement](/docs/getting-started/problem-statement).
Copy file name to clipboardExpand all lines: website/src/docs/guides/ci-cd.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ React Native Harness provides an official GitHub Action that simplifies running
19
19
-`callstackincubator/react-native-harness`
20
20
21
21
:::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.
23
23
:::
24
24
25
25
The action automatically:
@@ -30,7 +30,7 @@ The action automatically:
30
30
- Runs the tests
31
31
- Uploads crash reports from `.harness/crash-reports/` as workflow artifacts whenever a run produces them
32
32
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)).
Copy file name to clipboardExpand all lines: website/src/docs/platforms/android.mdx
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -107,7 +107,11 @@ The first argument is the manufacturer, and the second is the model name. These
107
107
108
108
## CI Notes
109
109
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.
Copy file name to clipboardExpand all lines: website/src/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ features:
24
24
details: Write tests using familiar describe, it, expect, beforeEach, and afterEach syntax. No new testing patterns to learn.
25
25
icon: <img src="/icons/speed-fast.svg" />
26
26
- 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.
28
28
icon: <img src="/icons/device-phone.svg" />
29
29
- title: Quick integration
30
30
details: Add to existing projects with straightforward configuration steps, TypeScript support and CI/CD compatibility.
0 commit comments