A sample of using Detox with React Native Sample App
-
Follow this guide outlined to setup 'React Native CLI QuickStart'
-
For Android see the Detox Guide Setting Up an Android Development & Testing Environment. The default avdName for this project is
Pixel API 30
.
-
Make a folder and navigate to it:
mkdir detox-sample
thencd detox-sample
. -
Clone the repo
git clone https://github.com/MuckT/Detox-Testing-React-Native.git
. -
Navigate to the folder you cloned into and install the dev dependencies:
yarn install
.
-
Start the App:
yarn start
-
In a new terminal run
yarn <android|ios>
to run the application
-
Create you Detox test build: Mac / Linux
detox build -c <android|ios>
OR Windowsyarn win:build:detox
-
Run the app
-
Run Detox:
yarn e2e:<android|ios>