Mobile Testing
Tags: mobiletesting, mobilequalityassurance, mobilecicd, testing
Published: 2022-01-03 21:27:30

Have you heard before about mobiles testing? This is a completely new world for the testing methodologies and the testing techniques, I feel that this will open your mind and let you realize that the testing world is so extensive and interesting, so with nothing else to say, let's begin!

We first will start that we have multiple kinds of apps for multiple kind of devices, for example we can have:

**- Native apps:** This means that the app was created and can be installed in a specific mobile operative system.
**- Hybrid apps:** This feels like and app but is a website packaged on a native wrapper.

With this in mind, let's say that we have a Native app that we would love to automate it testing phase, usually for web development, we try to prioritize the browser and it's version when executing our tests but, for mobile, this is more difficult to define because we have so many testing approaches and things that we should validate based on the app functionality. Some different tests that we can execute for a mobile app are:

1. Devices that will support the app (we don't have an standar device)
1. Sensor and device peripherals.
1. Availability under various network conditions.
1. Installability
1. Compatibility
1. Performance efficiency
1. Usability

As you can see, there are so many things that we can consider to reach a complete _mobile test suite_ for our app, but the first thing that we should review before starting should be define the region in which our app will operate to search for a _average mobile device_ with an _average android/ios_ (using the most used ones as example) _operative system_. Now that we have a starting point, we can start developing and testing our work, the thing is, as I mention at the beginning there are so many considerations for this kind of testing, like on starting phases we can use simulators for simulate our app behavior but, with the project growth, we should also start doing our test in real devices in real locations to have a more real test environment, for this kind of approaches there are several companies that sells this service of connecting with real devices to your application so you can execute real test cases, also, if you want to go deeper, you can leave your building and test the app on the street! Using real 4G or 5G connections, real time location, etc.

Now that we have an idea on how a mobile testing procedure can escalate, we should review again the different mobile testing types that we can apply based on our app main functionality:

1. Testing in different displays ().
1. Test Devices Input sensors (GPS on and off, etc).
1. Testing Various Input Methods (gestures).
1. Testing for typical interrupts (calls, chargers connected, etc).
1. Testing Access Permissions (position, denied permissions).
1. Testing notifications (low battery, conditions).
1. Testing connectivity methods (2G, 3G, 4G, WiFi).
1. Installability testing (install, update and de-install).
1. Stress testing (out-of-memory, high CPU usage, etc).
1. Security testing (access to sensitive data, unsafe storage, encryption of transferred and/or storaged data).

We can continue listing a whole more testing types that we perform for mobile but I don't want to scare you haha. The thing is that, usually is not a single job person to execute all this testing types, all this testing types are splitted in several teams to confirm their correct behavior.

Now we will talk about the CI/CD approach for mobile, usually this keeps an standard flow like the one that we perform for our web based pipeline but with some extra steps, let's say that we usually have a deployment pipeline like this:

- Build pods (containers)
- Perform Unit tests
- Deploy to test env
- Deploy to stage
- Perform e2e tests
- Deploy to production

Now for mobile we will have some steps related to the app itself and also with the stores where the app will be visible:

**- Source phase:** here is where the code come from and what will trigger the pipeline execution.
**- Testing phase:** Unit test, UI test, Integration test.
**- Building phase:** here is the extra step that we have for mobile, in this step we will build the artifact and the code signing step to be able to send the new app version to the store of the different operative systems.
**- Deploy phase:** here we can have Alpha, Beta or production environment.

As I mention at the beginning, it's really exciting how mobile have some many testing types and considerations that we can develop and start playing with and yeah, I know, also is a lot of work to do...

Oh, before we finish this section, there is something that we should consider, the risks that we can find in the previous mentioned testing types:

1. Market fragmentation: to avoid this one is the suggested step of defining a most common used device to develop and test with.
1. Cost of multiple platforms: this can be minimized analyzing to support only the most common platforms.
1. New technologies and/on devices: when we get a new 5G connection for example, we can try to test using pre-production version of those new technologies.
1. Lack of devices availability: Crowd testing services or Remote devices services.

And finally, that's it, of course is easier to read about this than actually execute this mobile testing types but at least we now have a better idea on how to do it, and I hope that I make you feel excited about how testing can be so big and interesting. Don't forget to ask any question or let your comments so we can discuss about it.