Skip to main content

How to Test a Release Candidate

Pre-requisites​

  • Have a clone of react-native repo and be on the release candidate branch.

    # Checkout relevant branch
    git checkout 0.66-stable
    yarn install

    # I needed a .watchmanconfig because `npm start` would fail without it.
    echo '{}' > .watchmanconfig
  • Have Android and iOS development environment set-up. Follow instructions for macOS/iOS and macOS/Android from the Environment Setup guide.

    Additional steps for Android​

    • Gradle should now install the appropriate ndk. Verify that you have in your path the ANDROID_NDK variable, pointing to it.
    • In case you are on macOS Catalina (or higher), you might also need to run sudo xattr -r -d com.apple.quarantine /path/to/ndk to avoid the e2e script to fail. That said, this should not happen anymore since from NDK 21 and higher the Android team started signing the NDK.*

Test Dimensions​

Covered by running test-manual-e2e.sh, see issue about supporting those "manual" cases.

VariantRNTesterTemplate App
Android - JSCvia test-manual-e2e.shvia test-manual-e2e.sh
Android - Hermesvia test-manual-e2e.shmanual
iOS - JSCvia test-manual-e2e.shvia test-manual-e2e.sh
iOS - Hermesvia test-manual-e2e.shmanual

Test Checklist​

Link to branch:
Project info
Name
Starting RN version<add me, ex. RN 0.65.1>
Hermes on iOSyes/no
Hermes on Androidyes/no
Tested - iOS
Fast Refreshβœ…/🚨/πŸ™…β€β™‚οΈ
Debug/dev build on Simulatorβœ…/🚨/πŸ™…β€β™‚οΈ
Debug/dev build on Deviceβœ…/🚨/πŸ™…β€β™‚οΈ
Production buildβœ…/🚨/πŸ™…β€β™‚οΈ
Chrome remote debuggerβœ…/🚨/πŸ™…β€β™‚οΈ
Hermes debuggerβœ…/🚨/πŸ™…β€β™‚οΈ
Flipper debuggerβœ…/🚨/πŸ™…β€β™‚οΈ
Tested - Android
Fast Refreshβœ…/🚨/πŸ™…β€β™‚οΈ
Debug/dev build on Emulatorβœ…/🚨/πŸ™…β€β™‚οΈ
Debug/dev build on Deviceβœ…/🚨/πŸ™…β€β™‚οΈ
Production buildβœ…/🚨/πŸ™…β€β™‚οΈ
Chrome remote debuggerβœ…/🚨/πŸ™…β€β™‚οΈ
Hermes debuggerβœ…/🚨/πŸ™…β€β™‚οΈ
Flipper debuggerβœ…/🚨/πŸ™…β€β™‚οΈ

Steps​

  1. Delete RNTester and RNTestProject from your Android emulator and iOS simulator if leftover from previous test.

  2. Remove any temporary files:

     git clean -fdx
  3. Install dependencies:

     yarn install
    pushd packages/rn-tester
    pod install --repo-update
    popd
  4. Go through Test Checklist for variants supported by test-manual-e2e script:

    # This will run you through the different variants in Test Dimensions table
    ./scripts/test-manual-e2e.sh
  5. Go through Test Checklist for Hermes enabled template app.

    info

    Script will install template app at /tmp/RNTestProject.

  • Enable Hermes for Android template app, clean, build and go through Test Checklist.

    # Update `/tmp/RNTestProject/android/app/build.gradle` to `enableHermes`
    project.ext.react = [
    enableHermes: true, // clean and rebuild if changing
    ]

    # Clean and rebuild
    /tmp/RNTestProject/android$ ./gradlew clean
    /tmp/RNTestProject$ npx react-native run-android
  • Enable Hermes for iOS template app, clean, build and go through Test Checklist.

    # Update `/tmp/RNTestProject/ios/Podfile` and then run `pod install`
    use_react_native!(
    :path => config[:reactNativePath],
    # to enable hermes on iOS, change `false` to `true` and then install pods
    :hermes_enabled => true
    )

    # Install pods and run
    /tmp/RNTestProject/ios$ pod install
    /tmp/RNTestProject$ npx react-native run-ios

Other dimensions to consider​

  • Running your iOS project with --release configuration.
  • Attempting to upload your app to TestFlight.