CocoaPods installation
https://github.com/google/EarlGrey/blob/master/docs/install-and-run.md#github-installation
step 1:
1 Add Target, select iOS→Test→iOS Unit Testing Bundle
2 Product→Scheme→Manage Schemes, press the plus(+)sign, and then select the target from the dropdown menu. Ensure the Container is set to the app under test.
Step 2: Add EarlGrey as a framework dependency
Install the EarlGrey gem by doing gem install earlgrey. //sudo gem install earlgrey -n /usr/local/bin
In the test target's section in your Podfile, add EarlGrey as a dependency.
open -e Podfile
target TEST_TARGET do
project PROJECT_NAME
use_frameworks! # Required for Swift Test Targets only
inherit! :search_paths # Required for not double-linking libraries in the app and test targets.
pod 'EarlGrey'
end
Once finished, do a pod install.
Step 3: Open the workspace and verify that you see EarlGrey.
After you successfully run thepod installcommand, open the generated workspace and find EarlGrey installed in thePods/directory.
------------
schema ->diagnostics-> don't check main thread checker
网友评论