Skip to content

Setup Detox Gray box E2E test automation framework in a React-native app (Android & iOS)

Notifications You must be signed in to change notification settings

Avinash-Kannan/Detox-grayboxTest-e2e

Repository files navigation

Setup Detox e2e test in a basic React-native app


Create a basic react native app

  • Run the following command :

    npx react-native init <project_name>

  • Add any baisc header, button or input text box in App.js

  • To run your app in iOS/ Android emulator, Run command :

    npm run ios / npm run android

Install detox and jest dependencies

  • npm install -D detox
  • npm install -D jest

Initiate detox setup using below command :

npx detox init -r jest

This would have added detoxrc.json file and e2e folder.

Configure iOS and Android setup for Detox

Build and Run Detox tests

  1. To start metro server, Run command:
  • npm run start
  1. To build and run tests in android emulator:
  • npm run build-android
  • npm run run-android
  1. To build and run tests in iOS simulator:
  • npm run build-ios
  • npm run run-ios

About

Setup Detox Gray box E2E test automation framework in a React-native app (Android & iOS)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published