When testing on CI it'd be nice to be able to just run
expo start -I &
and then kick off tests. Instead it seems like the metro server times out and returns
+ 30563 suspended (tty output) expo start -I
then the app stalls.
One of the main selling points of Expo is the Expo Go development process. Development with Expo Go when iterating and running unit tests or component tests locally is lightning fast. However, there is some confusion and pain when getting E2E tests running with Detox or WebDriverIO + Appium. There are possibilities, but it’s kind of a messy process to get started with a lot of holes in the documentation.
Locally you can run
expo start -I (or -a)
then run tests with detox, but I’m not sure this is possible without hackiness to get it working with Appium. The idea would be to not only make this process more clear, but to also use it as a way to get people into the Expo Ecosystem from a testing perspective with Expo Go/Expo Publish. On CICD, the documentation is pretty sparse on both spinning up emulators/simulators and testing against an Expo Go client with JS Bundle Update on CI, and also when to use eas build —local then send that .ipa to be tested on real devices (on AppCenter or something).
So there are 3 situations where support/documentation could be better. Testing locally, testing on CICD with a simulator/emulator, testing on physical devices on a device farm. And in each of those scenarios highlighting when you can use
expo start
and running on that simulator, or when you have to use
eas build —local
E2E testing with Expo could be a huge selling point, and should be supported fully to keep it that way. Imagine being able to run quick E2E tests on every PR without needing to build? Think of the time and $$$ savings! This could be a huge deal for testing in the Expo ecosystem.
Imagine being able to expo publish or expo start and have tests kick off almost immediately on CI.
Instead, there is kind of sparse and confusing documentation on getting a build setup to be tested against on CICD (and locally). I know the Native End to End Testing feature request has a lot of upvotes (176) right now, but this request is more aimed at prioritizing any sort of e2e testing straight from an expo start, or an expo publish and supporting that with dev work + filling holes in documentation.
(Note: I am mostly speaking from managed workflow using Detox for E2E Testing)
Something concrete would be a flag to pass into Expo Start that would keep the server open. Workflow would be like start simulator on CI, run
expo start -I --ci
, and then
yarn detox