RN testing & observability · Trade-off
Testing strategy and E2E tool choice
Practise this out loud
Say your answer out loud to an AI interviewer that follows up, and get a score for it.
Practise by voiceThe interviewer asks
What belongs in unit, integration and E2E tests for an RN app? Detox or Maestro, and why?
Then
Follow-ups the interviewer asks next
- "How do you test a component that uses a native module?"
- "Flaky E2E: what causes it?"
- "What's your coverage philosophy?"
The answer
What a strong answer covers
- Unit: reducers, hooks, utilities (Jest).
- Integration: screens with RNTL querying by role and text, MSW or mocked fetch, mocked native modules (
jest.mock). - E2E: a few critical journeys (login, checkout) in release builds.
- Detox: grey-box, synchronized with the RN bridge or runtime, strong for RN, harder setup.
- Maestro: black-box YAML, fast to write, also covers WebViews and system dialogs.
- 0.85 moved the Jest preset to
@react-native/jest-preset.
The red pen
Common traps
Avoid:snapshot tests as the main strategy.
Practise this out loud
Say your answer out loud to an AI interviewer that follows up, and get a score for it.
Practise by voicePractise questions like this out loud
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.