The complete guide to testing React Native app using Cypress

Click for: original source

We can test a React Native application using Cypress end-to-end test runner while running it in the web mode using Expo. By Gleb Bahmutov.

If your company is evaluating using the React Native technology for developing its native mobile application, you are probably wondering how to write and run the tests. The React Native testing docs really only focus on unit testing using Jest running in Node. You cannot see what the application is doing, and if something goes wrong, good luck debugging it.

Most of the sections in this post are covered by short videos in author’s Testing React Native Application Using Cypress video playlist. Some of the videos are embedded in the relevant sections of the post:

  • The initial application
  • The first Cypress test
  • Continuous integration
  • Network control
  • Test the loading indicator
  • Stubbing network call
  • Code coverage
  • Resources
  • Adding expo to react-native projects
  • Expo camera
  • Code examples

… and much more. You will also get link to further learning resources in the article. Good job!

[Read More]

Tags frontend app-development react tdd