Skip to content

[CI] Detox project integration - automated self-test flow #3415

@d4vidi

Description

@d4vidi

Describe your idea

Create a CI flow that would step-by-step integrate detox into a fresh RN project and verify that firstTest passes successfully:

  1. Bootstrap a specific (or latest) version of a React Native boiler project:
    npx react-native init SelfTestProject --version 0.67.4
  2. From within the project directory, install Detox:
    npm i detox --save-dev
  3. Run the sequence of shell commands according to Jest Setup Guide:
    npm install -D "jest@>=27.2.5"
    npx detox init -r jest
    and automatically apply necessary patches for iOS:
     apps: {
       ios: {
         type: 'ios.app',
    -    binaryPath: 'SPECIFY_PATH_TO_YOUR_APP_BINARY',
    +    binaryPath: 'ios/build/Build/Products/Debug-iphonesimulator/SelfTestProject.app',
       },
       android: {
         type: 'android.apk',
    -    binaryPath: 'SPECIFY_PATH_TO_YOUR_APP_BINARY',
    +    binaryPath: 'android/app/build/outputs/apk/fromBin/debug/app-fromBin-debug.apk',
       },
     },
  4. Run: detox build -c ios.sim.debug and detox build -c ios.sim.release.
  5. Run the tests both for the debug and release configurations. Make sure they pass on the boilerplate app. 🟢 :octocat:

Image by Gerd Altmann from Pixabay

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions