Run the unit tests for the Bugsnag
library from Xcode or by running make test
on the command-line. To specify a specific iOS SDK, run with the SDK name:
make SDK=iphonesimulator11.3 test
Or test on macOS:
make PLATFORM=macOS test
Or to test on tvOS:
make PLATFORM=tvOS test
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.
For testing against a real device, maze-runner's CLI and the test fixtures are containerized so you'll need Docker (and Docker Compose) to run them.
Note: only Bugsnag employees can run the end-to-end tests. We have dedicated test infrastructure and private BrowserStack credentials that cannot be shared outside of the organization.
- Xcode
- Make
- Docker
- Docker-compose
- AWS
opensource
profile credentials - BrowserStack credentials
You'll need to set the credentials for the aws profile in order to access the private docker registry:
aws configure --profile=opensource
Subsequently you'll need to run the following commmand to authenticate with the registry:
$(aws ecr get-login --profile=opensource --no-include-email)
Your session will periodically expire, so you'll need to run this command to re-authenticate when that happens.
- Ensure the following environment variables are set:
MAZE_DEVICE_FARM_USERNAME
- your BrowserStack App Automate UsernameMAZE_DEVICE_FARM_ACCESS_KEY
- your BrowserStack App Automate Access KeyMAZE_BS_LOCAL
- location of theBrowserStackLocal
executable on your local file system
- Build the test fixtures:
make test-fixtures
- Check the contents of
Gemfile
to select the version ofmaze-runner
to use - See https://www.browserstack.com/local-testing/app-automate for details of the required local testing binary.
- To run a single feature:
bundle exec maze-runner --app=features/fixtures/ios-swift-cocoapods/output/iOSTestApp.ipa \ --farm=bs \ --device=IOS_14 \ features/app_and_device_attributes.feature
- To run all features, omit the final argument.
- Maze Runner supports various other option, as well as all those that Cucumber does. For full details run:
`bundle exec maze-runner --help`