Running Detox With Expo
Ensure Node is 8.3.0 or higher.
1. Yarn add
2. Add the following to package.json
…and to the scripts object:
3. Download IPA
Fetch the IPA file from here
4. Copy e2e files
Fetch/copy files from Github
A basic example of incorporating some useful detox calls:
The element can be selected by making the most of using the
testId — for example, the following test button has ID
Running the tests
Finally, to run the test we can run
yarn start in one terminal and
yarn e2e on the other to run the
e2e script. Note that you need to have live reload disabled, so better to also put the app into production mode before running the e2e tests. This can be done from the terminal following the instructions to set production mode.
You may need to add the
--reuse flag to the
e2e script. At the time of writing, the current version 0.55 is having issues on iOS with hanging. The requirement at the moment is that you have to open and close the Expo window. See this GitHub issue for more info.
1,200+ PEOPLE ALREADY JOINED ❤️️
Get fresh posts + news direct to your inbox.
No spam. We only send you relevant content.