These tests are implemented with our notifier testing tool Maze runner.
End-to-end tests are written in Cucumber-style .feature
files, and need Ruby-backed "steps" in order to know what to
run. The tests are located in the 'features' directory.
- Xcode
- Make
- BrowserStack credentials or device running a modern version of iOS.
Build the test fixtures:
make test-fixtures
- Ensure the following environment variables are set:
BROWSERSTACK_USERNAME
- your BrowserStack App Automate UsernameBROWSERSTACK_ACCESS_KEY
- your BrowserStack App Automate Access KeyMAZE_BS_LOCAL
- location of theBrowserStackLocal
executable on your local file system
- See https://www.browserstack.com/local-testing/app-automate for details of the required local testing binary.
- Check the contents of
Gemfile
to select the version ofmaze-runner
to use - To run all features (on iOS):
bundle exec maze-runner --app=./features/fixtures/app/build/ios/ipa/app.ipa \ --farm=bs \ --device=IOS_14
- Install a proxy server such as
mitmproxy
:brew install mitmproxy
- Install Appium
npm install -g appium@1.21
- Set
MAZE_APPLE_TEAM_ID
to your Apple Developer Team Id. - The test fixture is hard-coded to send requests to
bs-local.com:9339
(BrowserStack's approach to local testing).
Add an entry for bs-local.com to/etc/hosts
:127.0.0.1 bs-local.com
- Run the proxy
mitmproxy
- Set a manual proxy on your device's network connection to the IP of your Mac and port of the proxy
(8080 by default for
mitmproxy
).
- Run Maze Runner as follows, adjusting for your specific device:
bundle exec maze-runner --app=./features/fixtures/app/build/ios/ipa/app.ipa \ --udid=<udid> \ --os=ios \ --os-version=14
<udid>
is the device Identifier found under Devices and Simulators in Xcode.
- Maze Runner supports various other options, as well as all those that Cucumber does. For full details run:
`bundle exec maze-runner --help`