EarlGrey

EarlGrey is a native iOS UI automation framework that enables you to write clear, concise test cases. With the EarlGrey framework, you can access enhanced synchronization capabilities. EarlGrey automatically synchronizes with UI, network requests, and various queues, but still allows you to manually implement custom times as needed. EarlGrey’s synchronization features help ensure that the UI is in a stable state before performing an action. This greatly improves Test stability and makes tests highly repeatable. EarlGrey works with the XCTest framework and integrates with Xcode’s Test Navigator, so you can run tests directly from Xcode or from the command line (using XcodeBuild).

start

The user’s instructions are located in the EarlGrey/ Docs folder. To get started, check out the EarlGrey feature, check compatibility, and then install/run EarlGrey with test targets. After all the configuration is complete, check out the EarlGrey API and start writing your own tests.

help

If you need help, there are multiple channels available. First check the FAQ. If you encounter more questions after reading the FAQ, see Known Issues. You can ask more specific questions at stackoverflow.com using the # earlGrey tag. You can also start a new discussion with us on our Google group or request to join our collaboration channel.

Analysis of the

To enhance and improve EarlGrey, the framework collects usage data and uploads it to Google Analytics. More specifically, the framework collects md5-encrypted Bundle ids, test class names, and test method names. This information allows us to measure usage. For more details on the analysis collection, read the GREYAnalytics. M file that contains implementation details. If they wish, users can opt out by disabling the Analytics configuration Settings in their tests – (void) setUp method:

In Objective-C:

// Disable analytics.
[[GREYConfiguration sharedInstance] setValue:@(NO) forConfigKey:kGREYConfigKeyAnalyticsEnabled];
Copy the code

In Swift:

// Disable analytics.
GREYConfiguration.sharedInstance().setValue(false, forConfigKey: kGREYConfigKeyAnalyticsEnabled)
Copy the code

Contribute code

Make sure you follow the guidelines in CONTRIBUTING. Md before making a contribution.

Set up an EarlGrey project

  1. Clone EarlGrey from GitHub.

    git clone https://github.com/google/EarlGrey.git
    Copy the code
  2. After Clone EarlGrey, download all dependencies using setup-earlgrey.sh.

  3. When the script is finished, open earlgrey.xcodeProj and verify that all targets were successfully built.

  4. You can now make changes to the framework using Earlgrey.xcodeProj.