EarlGrey — IOS UI Testing Framework

Tudip Technologies
1 min readJan 10, 2022

With today’s UI testing framework, most of the UI tests are slow and complex to write and Synchronization of UI is the major issue.

EarlGrey

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

Features

  1. Synchronization:
  • EarlGrey’s synchronization features help to ensure that the UI is in a steady state before actions and assertions are performed. This greatly increases test stability.
  • EarlGrey automatically synchronizes with the UI, network requests, main Dispatch Queue, main NSOperationQueue, Animations, Gestures, Network, View Controller Appearance / Disappearance, Keyboard interaction, Scrolling, Apps main run loop and Web View.
  • There is no need to add manual waits for resource idealisation. An example where manual waits need to be added is KIF testing framework.
  • EarlGrey works in conjunction with the XCTest framework and integrates with Xcode Test Navigator so you can run tests directly from Xcode or the command line (using xcodebuild command).

2. Visibility Checks:

  • Before every UI interaction, EarlGrey asserts that the elements which are being interacted with are actually visible and not just present in the view hierarchy.

3. User-like Interactions:

  • Swipes, scrolls, and taps are performed just as a user interacts with the app.

Read more: https://tudip.com/blog-post/earlgrey-ios-ui-testing-framework/

--

--