Need help with EarlGrey?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

google
5.3K Stars 727 Forks Apache License 2.0 782 Commits 184 Opened issues

Description

:tea: iOS UI Automation Test Framework

Services available

!
?

Need anything else?

Contributors list

# 18,378
C
Objecti...
Shell
test-fr...
222 commits
# 25,455
Objecti...
Swift
Shell
test-fr...
139 commits
# 38,212
Objecti...
Swift
Shell
test-fr...
73 commits
# 1,968
Ruby
Windows
iOS
appium
52 commits
# 48,729
Objecti...
Shell
CSS
test-fr...
48 commits
# 9,815
Python
Objecti...
Shell
test-fr...
33 commits
# 72,839
Objecti...
Shell
HTML
test-fr...
23 commits
# 87,691
C
Objecti...
coding-...
Shell
16 commits
# 93,789
Objecti...
Shell
CSS
test-fr...
14 commits
# 164,693
Objecti...
Shell
CSS
test-fr...
4 commits
# 133,047
Kotlin
corouti...
Shell
iOS
3 commits
# 6,394
Objecti...
cocoa-t...
iOS
React N...
3 commits
# 6,673
C#
Elixir
appium
kotlin-...
3 commits
# 79,681
Objecti...
micropy...
armv8
raspber...
2 commits
# 214,820
swift5
Objecti...
carthag...
Xcode
2 commits
# 214,714
Objecti...
Shell
CSS
test-fr...
2 commits
# 132,930
Xcode
bazel
iOS
C
2 commits
# 40,673
Ruby
Shell
JavaScr...
test-fr...
2 commits
# 124,841
Objecti...
Shell
CSS
test-fr...
2 commits
# 8,521
Swift
test-fr...
Objecti...
promise...
1 commit

Deprecation: EarlGrey 1.0 is deprecated in favor of EarlGrey 2.0 which integrates it with XCUITest. Please look at the earlgrey2 branch. EarlGrey 1.0 is not being maintained internally with iOS 13.

EarlGrey

Apache License CC-BY 4.0 License Build Status Carthage compatible CocoaPods Gem Version

For EarlGrey 2, please go to earlgrey2 branch.

EarlGrey is a native iOS UI automation test framework that enables you to write clear, concise tests.

With the EarlGrey framework, you have access to enhanced synchronization features. EarlGrey automatically synchronizes with the UI, network requests, and various queues; but still allows you to manually implement customized timings, if needed.

EarlGrey’s synchronization features help to ensure that the UI is in a steady state before actions are performed. This greatly increases test stability and makes tests highly repeatable.

EarlGrey works in conjunction with the XCTest framework and integrates with Xcode’s Test Navigator so you can run tests directly from Xcode or the command line (using xcodebuild).

Getting Started

The EarlGrey documentation for users is located in the EarlGrey/docs folder. To get started, review the EarlGrey features, check for backward compatibility, and then install/run EarlGrey with your test target. After everything is configured, take a look at the EarlGrey API and start writing your own tests.

Getting Help

If you need help, several resources are available. First check the FAQ. If you have more questions after reading the FAQ, see Known Issues. You can bring more specific issues to our attention by asking them on stackoverflow.com using the #earlgrey tag. You can also start new discussions with us on our Google group or request to join our slack channel.

Analytics

To prioritize and improve EarlGrey, the framework collects usage data and uploads it to Google Analytics. More specifically, the framework collects the MD5 hash of Bundle ID, Test Class Names and Test Method Names. This information allows us to measure the volume of usage. For more detailed information about our analytics collection, please peruse the GREYAnalytics.m file which contains the implementation details. If they wish, users can choose to opt out by disabling the Analytics config setting in their test’s

- (void)setUp
method:

In Objective-C:

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

In Swift:

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

For Contributors

Please make sure you’ve followed the guidelines in CONTRIBUTING.md before making any contributions.

Setup an EarlGrey Project

  1. Clone the EarlGrey repository from GitHub:

    git clone https://github.com/google/EarlGrey.git

  2. After you have cloned the EarlGrey repository, download all the dependencies using setup-earlgrey.sh.

  3. After the script completes successfully, open

    EarlGrey.xcodeproj
    and ensure that all the targets build.
  4. You can now use

    EarlGrey.xcodeproj
    to make changes to the framework.

Add and Run Tests

Unit Tests

To add unit tests for EarlGrey, use

UnitTests.xcodeproj
located at
Tests/UnitTests
. To run all unit tests, select the UnitTests Scheme and press Cmd+U.

Functional Tests

To add functional tests for EarlGrey, use the

FunctionalTests.xcodeproj
located at
Tests/FunctionalTests
. To run all functional tests, select the FunctionalTests Scheme and press Cmd+U.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.