Commit 47db7d8f authored by Mike Baxley's avatar Mike Baxley Committed by Commit Bot

Add Chromium for iOS test documentation.

Create documentation on how to run different iOS test suites.

TBR: huangml
Bug: 769753
Change-Id: I1e63c6c603a10389ccc89050b01e075fd08e39ae
Reviewed-on: https://chromium-review.googlesource.com/772784Reviewed-by: default avatarMike Baxley <baxley@chromium.org>
Commit-Queue: Mike Baxley <baxley@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517095}
parent 83aef1c3
...@@ -252,6 +252,7 @@ used when committed. ...@@ -252,6 +252,7 @@ used when committed.
iOS app open links in Chrome. iOS app open links in Chrome.
* [User Agent in Chrome for iOS](ios/user_agent.md) - Notes on User Agent * [User Agent in Chrome for iOS](ios/user_agent.md) - Notes on User Agent
strings using Chrome for iOS. strings using Chrome for iOS.
* [Running iOS test suites locally](ios/testing.md)
### Media ### Media
* [Audio Focus Handling](media/audio_focus.md) - How multiple MediaSession * [Audio Focus Handling](media/audio_focus.md) - How multiple MediaSession
......
# Automated testing for Chrome for iOS
See the [instructions] for how to check out and build Chromium for iOS.
Automated testing is a crucial part of ensuring the quality of Chromium.
## Unit testing
Unit testing is done via gtests. To run a unit test, simply run the test
target (ending in _unittest).
## Integration testing
[EarlGrey] is the integration testing framework used by Chromium for iOS.
### Running EarlGrey tests
EarlGrey tests are based on Apple's [XCUITest].
#### Running tests from Xcode
An entire suite of tests can be run from Xcode.
1. Select the *egtest target you wish to run.
2. ⌘+U to run all the tests. Note: ⌘+R, which is normally used to run an
application, will simply launch the app under test, but will not run the
XCTests.
A subset of tests can be run by selecting the test or test case from the
XCTest navigator on the left side of the screen.
#### Running from the command-line
When running from the command-line, it is required to pass in the *.xctest
target, in addition to the test application.
Example:
```
./out/Debug-iphonesimulator/iossim -d "iPad Retina" -s 8.1 \
out/Debug-iphonesimulator/ios_chrome_integration_egtests.app \
out/Debug-iphonesimulator/ios_chrome_integration_egtests_module.xctest
```
[EarlGrey]: https://github.com/google/EarlGrey
[instructions]: ./build_instructions.md
[XCUITest]: https://developer.apple.com/documentation/xctest
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment