<- Blog

Testing Wikipedia flows on Maestro.

Ronak Kadhi March 17, 2023

In current times where mobile traffic has surpassed web traffic for many major companies, testing the app’s user experience has become even more critical than before. User experience has become an essential factor in determining the success or failure of an app. But still, we find many apps on Playstore & Appstore plagued with 1-star reviews.

The primary reason for this can be developer productivity. In an ever-changing world, shipping new features is a top priority. Speed is valued over quality, but in the long run, Apps that have scaled far beyond their means have cared more about customer experience.

That’s why we are building Maestro, a platform that lets the developer proactively catch quality issues. The Maestro platform sits perfectly into the CI process, blocking any code change that can possibly degrade the app.

Using Maestro is super simple. First, we divide the application into flows. Flows are parts of the user journey in the app example, Login, Checkout, and Add cart are three different flows. Most common flows are predefined in Maestro, so testing them by writing single-line commands is super simple.

To showcase Maestro’s ability, we have decided to break down Wikipedia’s app into notable flows which are critical for the app’s utility. These flows that are listed below are then tested using Maestro. The code blocks are also available for users to get

  • Onboarding on Wikipedia
  • Search Content
  • Save content
  • Scroll the feed
  • Copy & paste
  • Log in to an existing user
  • Sign up a new user

TLDR: Here is a thread describing the whole blog (without code blocks)

Onboarding

Test your user onboarding regularly to keep the best first impression. App onboarding experiences the highest user bounce rate. Ensuring no bugs in user onboarding can help you keep up with the growth numbers.

#Main onboarding flow
appId: org.wikipedia
---
- runFlow: "add-language.yml"
- runFlow: "remove-language.yml"
- tapOn: "Continue"
- assertVisible: "New ways to explore"
- tapOn: "Continue"
- assertVisible: "Reading lists with sync"
- tapOn: "Continue"
- assertVisible: "Send anonymous data"
- tapOn: "Get started"
#Add Language flow 
appId: org.wikipedia
---
- tapOn: "ADD OR EDIT.*"
- tapOn: "ADD LANGUAGE"
- tapOn:
    id: ".*menu_search_language"
- inputText: "Greek"
- assertVisible: "Ελληνικά"
- tapOn: "Ελληνικά"
- tapOn: "Back"
#Remove Language flow
appId: org.wikipedia
---
- tapOn: "ADD OR EDIT.*"
- tapOn: "More options"
- tapOn: "Remove language"
- tapOn:
    id: ".*wiki_language_checkbox"
    index: 1
- tapOn:
    id: ".*menu_delete_selected"
- tapOn: "OK"
- assertNotVisible: "Ελληνικά"
- tapOn: "Back"

Search Content

Searching for solutions on your app is a sign of an engaged user, and keeping the engagement number high is an important metric for user retention. Making sure the search works is an important step towards reducing churn.

Main Dashboard flow

#Main Dashboard flow
appId: org.wikipedia
---
- runFlow: "search.yml"
- runFlow: "saved.yml"
- runFlow: "feed.yml"
- runFlow: "copy-paste.yml"
#Search flow
appId: org.wikimedia
---
- tapOn: "Search Wikipedia"
- inputText: "Sun"
- assertVisible: "Star in the Solar System"
- tapOn:
    id: ".*page_list_item_title"
- tapOn:
    id: ".*page_save"
- back
- back
- back

Save content

Users who save more come back more. Devising these features is a crucial hook. They can make or break your app. Hence, ensuring the content is saved and visible in the user’s saved list is an important flow for devs to watch.

#Save content flow
appId: org.wikimedia
---
- tapOn: "Saved"
- tapOn: "Default list for your saved articles"
- assertVisible: "Sun"
- assertVisible: "Star in the Solar System"
- back

Scroll the feed

Scrolling behaviour varies across devices and screen sizes. Testing this feature ensures a consistent user experience on various supported devices and screen sizes.

#Scroll Feed flow
appId: org.wikimedia
---
- tapOn: "Explore"
- scrollUntilVisible:
    element: "Today on Wikipedia.*"
- tapOn: "Today on Wikipedia.*"
- back

Copy & paste

Sometimes a test requires using a dynamic value from the app. With Maestro, you can easily find such values and copy and paste them where needed.

#Copy Paste flow
appId: org.wikimedia
---
- tapOn: "Explore"
- scrollUntilVisible:
    element: "Top read"
- copyTextFrom:
    id: ".*view_list_card_item_title"
    index: 0
- tapOn: "Explore"
- tapOn: "Search Wikipedia"
- inputText: "${maestro.copiedText}"
- back
- back

Log in to an existing user.

Most of us use third-party auth providers, which sometimes could be more unreliable. This unreliability can cost you not just in marketing dollars but also reputation. Testing the login flow can help you avert the uncertainty of locking out the users.

#Login flow
appId: org.wikimedia
---
- tapOn: "More"
- tapOn: "LOG IN.*"
- tapOn:
    id: ".*create_account_login_button"
- runScript: "../scripts/fetchTestUser.js"
- tapOn: "Username"
- inputText: "${output.test_user.username}"
- tapOn: "Password"
- inputText: "No provided"
- tapOn: "LOG IN"
- back
- back

Sign up a new user

Similar to onboarding, sign-up also sets the tone for the new user. A broken signup/auth module can trigger bad taste in users. We can relate to the team’s effort to get a user to download & sign-up just to see sign-up not work as intended.

#Sign up flow
appId: org.wikimedia
---
- tapOn: "More"
- tapOn: "LOG IN.*"
- runScript: "../scripts/generateCredentials.js"
- tapOn: "Username"
- inputText: "${output.credentials.username}"
- tapOn: "Password"
- inputText: "${output.credentials.password}"
- tapOn: "Repeat password"
- inputText: "${output.credentials.password}"
- tapOn: "Email.*"
- inputText: "${output.credentials.email}"

# We won't actually create the account
- back
- back

Using Maestro is super simple. These are some of the most common flows shown here. Maestro also has the ability to perform complex flows like asserting that a particular element is visible, taking screenshots, setting mock geo-locations, etc.

Maestro not only helps you test flows but also helps you improve the overall testing experience by tagging & recording the flow with simple commands. This can help you bring visibility among teams and collaborate to find solutions.

Visit Mobile.dev for more info & if you have any queries, join our community on slack, we would love to support you.

Happy testing!

We're entering a new era of software development. Advancements in AI and tooling have unlocked unprecedented speed, shifting the bottleneck from development velocity to quality control. This is why we built — a modern testing platform that ensures your team can move quickly while maintaining a high standard of quality.

Learn more ->