Edit on GitHub
Setting up and Running iOS End-to-End Tests
Local setup
- Install applesimutils:
brew tap wix/brew
brew install applesimutils
- Set XCode’s build location so that the built app, especially debug, is expected at the project’s location instead of the Library’s folder which is unique/hashed.
- Open XCode, then go to XCode > Preferences > Locations.
- Under Derived Data, click Advanced….
- Select Custom > Relative to Workspace, then set Products as Build/Products.
- Click Done to save the changes.
Test run in debug mode
This is the typical flow for local development and test writing:
- In one terminal window, run
npm run ios
from the root folder.
- In another terminal window, run
npm i
then npm run e2e:ios-test
from the /detox
folder.
Test run in release mode
This is the typical flow for CI test run.
- Build the release app by running
npm run build:ios-sim
from the root folder or npm run e2e:ios-build-release
from within the /detox
folder.
- Run the test using
npm run e2e:ios-test-release
from the /detox
folder.