How to do E2E testing


I originally come the world of web development. A few months ago, I started a new project where it requires the development of a mobile application. Given my prior knowledge, I chose Expo. And so far it has been great. I think Expo really lowers the barrier for someone like me to develop mobile applications. Thank you for that.

One area that I find severely lacking though is end-to-end testing though. In web development, E2E is common and fairly easy to set up. From my experience, E2E testing is great at catching bugs in the integration between the different systems that make up the app, for instance in routing or the integration between the frontend and the backend. The user onboarding of my project is fairly complex so ideally I’d just have a single E2E test that would have a user go through the onboarding process.

I did some research in this area and it seems that Detox is the most promising. However, they are quite explicit that an integration with Expo is not something that they want to support:

Note : Expo support with Detox is entirely a community driven effort. We have no specific support in Detox for Expo applications (ejected or otherwise).

If you are seeing an issue, it is most likely not an issue with Detox itself, but with the Expo runtime or with an incorrect Detox setup. For support on how to use Detox with Expo, you should contact the Expo team or the Expo community.

General Expo issues will no longer be allowed in the Detox issue tracker. If you’ve investigated the Expo runtime or your app, and found a genuine issue with Detox, please open an issue.

I tried setting up a simple E2E test with Expo but didn’t succeed. There are various threads on this forum and elsewhere that discuss problems that people have with integrating Detox into their Expo app:

None really seem to resolve the issues.

There is an official Expo guides on testing, Testing with Jest. But I think that Expo users would also benefit greatly from a guide on how to do end-to-end testing that just works.

Are there plans on extending this part of the documentation that seems lacking? Or are automated E2E tests not a thing in the mobile space and does it require another approach?


As I also mentioned in one of the other threads that you have posted, I am also very interested in understanding, if there are any plans to support e2e testing on real devices.
As far as I understand, there is no option to generate an ipa or apk to use directly with tools like AWS Device Farm or Browserstack.
It seems for now, if you want to use Expo, you can not have automated tests on real devices. At least I didn’t find any solution. Would be glad to be wrong.

We found out, that we can create an Adhoc Certificate for iOS to create an ipa for AWS Device farm, like described here:

Hope this helps someone!

We’re also very interested in E2E testing in Expo. Any news on this front?

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.