Testing - Mobile
Last modified on Mon 17 Oct 2022

Don’t just fix the bugs. Fix whatever permitted the bugs in the first place.

Summary

This article is a compendium of useful tips & tricks for testing mobile apps.

General

Android

iOS

General

Basics

Have a look at an one of our blog posts on testing mobile apps.

Selecting test devices

You cannot test your app on all possible devices. That is why it is important to intelligently decide on a set of devices on which you will do you your testing.

The two major mobile operating systems are:

Some parameters to keep in mind:

For instance, if you had time to test a Croatian mBanking Android app on a mobile device, it would make sense to have:

The device usage percentages of our apps can be retrieved from the Google Dev Console or iTunes Connect. Contact your team lead to get that info.

The usage of particular devices in general can be found on web sites such as StatCounter.

Device-wise, make sure to use:

Browsers that will almost always fit the criteria in a mobile environment are:

Another important parameter in testing is orientation:

Testing biometrics

When you test Android and iOS apps which allow the user to login with TouchID (iOS) or fingerprint (Android), you should check the following cases when the fingerprint login is enabled in the app:

When testing iOS apps which allow the user to log in with FaceID, you should check the following cases:

Testing Facebook analytics

Ensure Facebook SDK is implemented in the application, and that those analytics are set up correctly.

Find FacebookID of the account which you will use for testing. There are two ways of finding this ID, you either login to FB account and click on your profile name in the top left. Your ID will be visible in URL in the browser.

Facebook Analytics Admin needs to add this account to Facebook analytics. Account must be verified; otherwise, it cannot be added.

  1. Go to developers.facebook.com

  2. Click My apps in top right corner and select app you want to test from the dropdown menu. From the dashboard, click on View analytics. On the left side, click on Activity and then on Events

By default, Facebook tracks standard events such as App install and App launch. You can find events that are tracked out of the box by default and list of standard events here.

How to test?

See implemented platforms, check which event is implemented and its requirements. Then try to trigger that event, and if everything is done correctly, the event should show up on the event screen mentioned above.

Facebook analytics dashboard will not show triggered events instantly.

Testing valid IBAN numbers

Check out the list of valid IBAN numbers if you test your application's IBAN validation and make payments through the app using (foreign) IBAN numbers.

Android

Changing the ROM on Pixel devices

  1. Use a Windows PC, it's easier
  2. Visit the page https://toolaio.tk/
  3. Click the Download tab and download the .zip file
  4. Extract the .zip file and install the app
  5. Grab you Pixel device
  6. Ensure the device has Developer options turned ON (if not, click the Build number in the phone's Settings 5 times in a row)
  7. Open the Developer settings and turn ON OEM update and USB debugging
  8. Connect the Pixel device with your PC
  9. The dialog "Trust device?" will appear, click "Allow"
  10. Open the "TOOL ALL IN ONE" app on your PC
  11. Ensure the Pixel device is listed
  12. Click the "Unlock" button under the "Bootloader" section. This step will reboot the device
  13. After device is turned ON, it could be that you'll need to setup everything again
  14. Open the "TOOL ALL IN ONE" again, and click the "Flash Factory Image" under the "Other options" section
  15. Click the "Download Stock Rom" button and find the image you need (it will bring the page based on connected device. In our case, the list of stock Android versions (OEM) will appear)
  16. Download the zip and without unzipping it, open the "TOOL ALL IN ONE" again
  17. While you're on the "Generic Fastboot Rom Flasher" dialog, click the "[...}" button
  18. Find the location where the zip is stored and click select
  19. Click "Flash Rom"
  20. After this step, the desired Android version will be installed on a device
  21. As a final step, you should lock the bootloader by clicking the "Lock" button in the app

Devices supported by Google

Find them here.

If a device is not on this list, we usually cannot guarantee it is fully supported either.

Don't keep activities

A good practice when testing Android apps is to thoroughly circumnavigate the app with the "Don't keep activities" option enabled.

Users will usually not have this enabled, but it might point to issues that happen when the operating system decides to kill your activity, which it might do as part of its automatic memory management.

Enabling Developer options

You can unlock the Developer options on any Android smartphone or tablet by locating the Build number in your Settings menu and tapping it multiple times.

The exact location of the aforementioned build number may differ depending on your phone’s manufacturer.

Getting nice device logs

How to download a beta version of the app on Android

  1. Login to G+ community for beta testing with your @infinum.com account
  2. Force close Google Play Store and delete the cache and data for it
  3. Run TunnelBear or some other VPN and connect through the country that you need to work on desired app.
  4. Run Google Play Store, accept the T&C and skip the payment info
  5. Find the app and install it (log in, activate it, etc.)
  6. Accept that you are a beta tester for the app (the best way is to open https://play.google.com/apps/testing/package.name.of.theapp/)
  7. Wait for a little while for the change to propagate to Google Play (mostly for a few minutes)
  8. Go to Google Play page for the app and update it

How to fake your location on Android

On Android you can use Lockito or FakeGPS.

As always, iOS is a bit more complicated and deserves a special guide.

Installing an app from a foreign Google Play

In 1Password we have stored Google accounts for different countries:

  1. Germany
  2. USA
  3. Austria
  4. Netherlands
  5. Slovenia

Steps:

  1. First, make sure that you have installed some VPN client on your test device
  2. Next, go to Settings —> (Users &) Accounts and delete all Google accounts
  3. Then go to Settings —> Apps —> Google Play Store —> Storage —> Clear data - basically, delete cache for Play store
  4. Open your VPN client and connect to an appropriate country
  5. Login with appropriate Google account:

    1. Settings —> Users & accounts
    2. Agree with T&C and accept back up
  6. Open Google Play Store

    1. Find your app & click Install
    2. When Complete account setup appears, click on Continue then Skip
  7. After you’ve installed the app, delete the appropriate Google account & log in with our test account

  8. That's it, enjoy testing your app!

Setting up an Android emulator

We usually do not test apps on emulators, but sometimes they can come in handy.

To get an Android emulator, do the following:

iOS

Enabling iOS dev settings

  1. Open Xcode and connect your phone with an USB cable
  2. Open Settings on your iOS device
  3. Scroll down and tap ON "Developer"

Installing an app from a foreign App store

In 1Password we have stored Apple accounts for different countries:

  1. Germany
  2. USA

Steps:

  1. First, launch App store & tap on Apple ID (your avatar in the top right corner) & Sign out
  2. Then, open Settings, tap on General --> Language & Region --> Region & select the appropriate country
  3. Open the App store & once again click on your avatar in the top right corner & sign in with the aprropriate Apple ID account
  4. Type in the app you are looking for
  5. Click on Get & enjoy testing your app
  6. Don't forget to repeat step #1 & sign in with our regulard test account

Testing production builds on iOS

The file that actually gets uploaded to iTunes Connect cannot be installed on a development device since it first has to be signed by Apple.

This means that "Production" builds on Tryoutapps are not identical to what actually ends up on the App Store, only those that you get via Testflight are.

That's why you should make sure to always independently verify Testflight builds before they are published to users.

How to install iPhone or iPad apps on M1 Mac

New Apple desktop devices with M1 chips have a neat ability to install any iPhone or iPad apps on the M1 Macs. This is possible due to the common architecture shared by the two operating systems. The only way to install apps that are made for iPhone or iPad is to download them directly through the AppStore!

No porting required!

iPhone and iPad apps on the App Store are automatically available on the Mac App Store on Apple silicon Macs, there is no need to modify the app. The same frameworks that your apps use on iPhone and iPad are available and tuned just for Mac, taking advantage of the same shared architecture.

Here’s how you can download an app to install on an M1 mac:

  1. Open the ‌Mac App Store‌ and click your profile from the bottom-left of the page.
  2. Click ‘iPhone‌ & ‌iPad‌ Apps’ tab situated under Account.
  3. Select the app from the list and click the download button.

Once the app downloads, you can access it from the Launchpad or the Applications folder.

M1_iphone_apps

Some of the apps that you see in the ‌Mac App Store‌ are labeled with a warning that says "Not Verified for macOS," these apps are not optimized for use on a Mac.

Mac App Store availability

By default, apps are published automatically on the Mac App Store. App availability can be managed at any time in App Store Connect.

Circumventing the App Store or "sideloading" apps

Apps could be downloaded and installed via a third-party app (sideloaded) but Apple has disabled this feature on M1 Macs running macOS Big Sur 11.1 or newer. Currently, the only way to install the iPhone or iPad app on the M1 machine is to download it through the App Store.