Testing - Mobile

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.

Installing a build from Tryoutapps

  1. Navigate to Tryoutapps
  2. Open up the QR scanner on your phone (on iOS 11 and up, it is built into the Camera app)
  3. Scan the QR code
  4. Install the build

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 on G theoogle Dev Console or on 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 Androd 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

Jailbreaking iOS11 with Uncover

iOS jailbreaking is the privilege escalation of an Apple device for the purpose of removing software restrictions imposed by Apple on iOS, tvOS and watchOS operating systems.

It means giving apps admin (root) level access, which in term allows installation of other apps, tweaks and themes not on the App Store.

It supports the following iOS 11 versions: iOS 11, iOS 11.0.1, iOS 11.0.2, iOS 11.0.3, iOS 11.1, iOS 11.1.1, iOS 11.1.2, iOS 11.2, iOS 11.2.1, iOS 11.2.5, iOS 11.2.6, iOS 11.3, iOS 11.3.1 and iOS 11.4 beta 3.

Requirements:

Steps:

  1. Install/Sideload Unc0ver IPA using Cydia Impactor

    Connect your iPhone, iPad or iPod touch to the computer with the Lightning cable.

    Launch Cydia Impactor on your computer. It will detect your iOS device. Drag the Uncover jailbreak IPA file you had downloaded earlier on to its UI. Enter the Apple ID and password for your Apple Developer account when prompted, and wait for Cydia Impactor to sideload the signed app on your iOS device.

  2. Trust Developer Profile

    Once Uncover jailbreak IPA is successfully sideloaded. Launch the Settings app, and navigate to Settings > General > Profile(s) & Device Management (in some iOS versions it may just be General > Device Management).

    Tap on the entry with your Apple ID under Developer app, then tap on Trust. Tap on the Trust button. The status will change to Delete app.

    Note: This step is not required if you’ve used an Apple Developer account.

  3. Enable Airplane Mode

  4. Disable Siri

  5. Reboot iOS device

    After your device has rebooted, ensure that Airplane mode is still enabled, and also ensure Wi-Fi is disabled if it hasn’t got disabled while enabling Airplane mode.

  6. Run Jailbreak Process

    Launch the Uncover Jailbreak app from the Home screen, and tap the blue Jailbreak button to start the jailbreak process.

  7. Wait for Jailbreak to complete

    Cydia should also be installed on your Home screen. You should be able to launch it and install the jailbreak apps and tweaks. If you don’t see Cydia on the Home screen, then reboot your iOS device and launch Uncover Jailbreak and keep trying until it works.

    You can also disable Airplane mode and re-enable Siri after your iPhone, iPad or iPod touch has been successfully jailbroken.

    The complete guide can be found here.

Jailbreaking iOS12 with Uncover

There are many reasons to jailbreak iOS 12 such as to install iFile, which gives access to the file system, tweaks like Message Customizer that lets you customize each aspect of the Messages app, ability to lock apps and folders using Touch ID and lots more. You don’t even need access to a computer for the entire process.

You can download the latest version of Uncover jailbreak from Github hosted by pwn20wnd.

You can download the latest version of Chimera jailbreak from here hosted by Electra team.

Requirements

Steps:

  1. Download Latest Uncover beta

    Go to ignition.fun on your iPhone or iPad running iOS 12.4. Use the search bar to find Unc0ver. Tap on Get followed by Install. Wait for the app to download and install on your iOS device.

    UncOver

  2. Trust Certificate

    Head over to Settings-> General -> Device Management. Tap the developer name and trust the certificate. You will not be able to launch the Uncover jailbreak app on your iPhone/iPad without this.

  3. Jailbreak iOS 12.4 using Uncover

    Open Uncover, tap the Jailbreak button and wait for the app to do its job. Your iPhone or iPad will respring during the process after which you should see the Cydia icon on your home screen.

    If the app ends up freezing, wait for a few minutes. In case that does not work, reboot your iPhone/iPad and then repeat the above steps.

Check out the whole guide here.

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.


rodney.png