@react-native-harness/platform-windows
v1.5.0
Published
React Native Windows platform for React Native Harness
Readme

React Native Windows platform for React Native Harness — runs your harness tests against a deployed React Native Windows app.
Installation
npm install --save-dev @react-native-harness/platform-windows
# or
pnpm add -D @react-native-harness/platform-windows
# or
yarn add -D @react-native-harness/platform-windowsUsage
Add the Windows platform to your rn-harness.config.mjs:
import { windowsPlatform } from '@react-native-harness/platform-windows';
export default {
entryPoint: './index.js',
appRegistryComponentName: 'MyApp',
runners: [
windowsPlatform({
name: 'windows',
// Package.appxmanifest Identity/@Name
packageName: 'MyApp',
}),
],
};Deploy the app before running the harness — the runner launches an already installed package, it does not build:
npx react-native run-windows --arch x64 --no-launch --no-packager
npx react-native-harness --harnessRunner windowsAPI
windowsPlatform(config)
Parameters:
config.name— unique name for the runner.config.packageName— the app'sIdentity/@NamefromPackage.appxmanifest. Used to look the deployed package up withGet-AppxPackage.config.appId— the app'sApplication/@IdfromPackage.appxmanifest. Combined with the package family name into the AUMID used to launch the app. Defaults toApp(the React Native Windows template value).config.processName— the app's process name (without.exe), for tracking whether it is still running. Defaults topackageName.
Requirements
- Windows 10/11 with the app already deployed (
react-native run-windows). - The harness Metro server reachable at the app's configured bundle URL (
http://localhost:8081by default).
Made with ❤️ at Callstack
react-native-harness is an open source project and will always remain free to use. If you think it's cool, please star it 🌟. Callstack is a group of React and React Native geeks, contact us at [email protected] if you need any help with these or just want to say hi!
