5 tips & tricks for mobile testing

Moataz Nabil, Developer Advocate at Bitrise is an experienced test automation engineer, who'd like to give you some useful advice in our brand new Tips & Tricks series!

Hi! I'm Moataz Nabil, Developer Advocate at Bitrise. I'm also an experienced test automation engineer, and now I'd like to give you some useful advice for mobile application testing in our brand new Tips & tricks series. Let's get started!

💡 Mobile Testing Tip #1: 

Android and iOS UI Tests Parallelization using Flank and Firebase Test Lab

When the app is scaling, UI Tests become a monster increasing our build times. Parallelization is the key! If you are using Firebase Test Lab for mobile testing, Flank is a massive parallel Android & iOS test runner for Firebase Test Lab. Its YAML is compatible with GCloud's CLI. Flank also provides extra features to accelerate velocity and increase quality. Find more info in this video!

Code example: moatazeldebsy / parallelize-android-UI-Tests-with-Bitrise

Screenshot 2021-05-04 at 12.20.55.png
Screenshot 2021-05-04 at 12.21.32.png
Screenshot 2021-05-04 at 12.22.10.png
Screenshot 2021-05-04 at 12.22.36.png

 

💡 Mobile Testing Tip #2: 

iOS UI Tests Parallelization using Fastlane

Complex mobile apps require a bunch of tools from coding to deploying. fastlane is a tool for iOS and Android developers to automate tasks like building apps, running UI tests, generating screenshots, dealing with provisioning profiles, and releasing applications. To reduce test run time, inspect partial results periodically during a test run, and provide better results reporting around your UI tests, you can use the multi_scan feature from the test_center fastlane plugin.

Screenshot 2021-05-04 at 12.37.26.png
Screenshot 2021-05-04 at 12.46.08.png
undefined

  

💡 Mobile Testing Tip #3: 

Flutter UI Tests Parallelization using Sylph

Flutter keeps growing in the market: thousands of companies are developing apps using the framework. But mobile UI testing is important to deliver world-class applications, even with Flutter. To achieve this, you can use Sylph: it's a command-line utility for running Flutter integration and end-to-end tests on pools of real iOS and Android devices in the cloud. Sylph works with AWS Device Farm for up to hundreds of Android and iOS devices in a single run.

undefined

 

💡 Mobile Testing Tip #4: 

Building Android UI testing Framework

Test Automation is a vital part of the mobile CI/CD pipeline. Building a scalable, reusable and maintainable Android UI testing framework is a challenging task, but here are some of the frameworks that can help you to make your UI test faster, easier, and more predictable. Built on top of Espresso:

 

💡 Mobile Testing Tip #5: 

Difference between XCUITest and EarlGrey for iOS UI Testing

Choosing a suitable test automation framework for your team is always a big challenge. EarlGrey and XCUITest both are native UI testing frameworks for iOS. Let's see EarlGrey 2.0's advantages over XCUITest:

  • Automatic synchronization with animations, dispatch queues, and network requests
  • Built-in white-box testing support with RMI
  • Better support for flakiness issues
  • Better control of tests: EarlGrey has a much larger set of matchers
  • EarlGrey performs a pixel-by-pixel check for the visibility of an element

Find more info in this article: The ultimate guide to unit and UI testing for beginners in Swift

I hope you found these tips helpful. Feel free to reach out on our Twitter account and suggest your own ideas that could help your fellow mobile devs to tackle daily challenges!

📚 You can read more about mobile testing in the following articles:

Making Xcode UI tests faster and more stable by John Sundell

Building a unit testing suite with XCTest, Swift, and Bitrise by John Sundell

Solving flaky tests by making use of Xcode on virtual machines by Antoine van der Lee

Speeding up iOS builds by 'fanning out' tests on Bitrise by Damien Murphy

The Mobile DevOps Newsletter

Explore more topics

App Development

Learn how to optimize your mobile app deployment processes for iOS, Android, Flutter, ReactNative, and more

Bitrise & Community

Check out the latest from Bitrise and the community. Learn about the upcoming mobile events, employee spotlights, women in tech, and more

Mobile App Releases

Learn how to release faster, better apps on the App Store, Google Play Store, Huawei AppGallery, and other app stores

Mobile DevOps

Learn Mobile DevOps best practices such as DevOps for iOS, Android, and industry-specific DevOps tips for mobile engineers

Mobile Testing & Security

Learn how to optimize mobile testing and security — from automated security checks to robust mobile testing and more.

Product Updates

Check out the latest product updates from Bitrise — Build Insights updates, product news, and more.

The Mobile DevOps Newsletter

Join 1000s of your peers. Sign up to receive Mobile DevOps tips, news, and best practice guides once every two weeks.