[XDA-University] Ravi H Basawa:
How to Test a Mobile Application?

4. How to Test a Mobile Application?​

1. Installation testing:

To Verify application can be installed successfully.

Different ways of Installing an application to Android Device:

1(a). OTA(Over The Air) : We can install our application by using android play store app on the mobile or else by browsing into Google playstore website. This can be done using WiFi as well as by using GPRS connection.

1(b). Sideloading From Your PC : To do this we need ADB(Android Debug Bridge). This is a very simplest way to install any 3rd party app to your device, most of the time we test engineers prefer this way only.

Just download and Install Android SDK to your system and follow the below steps:

1. Download the application (APK) file to a folder of your choice on your computer.

2. Connect the phone to the computer through the USB port.

3. Enable installation of non-market applications on your phone:

a. On your phone, open the Applications menu (i.e., the tab in the bottom center of the

phone’s home screen) and click on the Settings application, then select Applications

from the Settings menu.

b. Make sure that the first selection, Unknown Sources, is checked so that you can install

an APK file from a location other than the Android Market. A warning message about

the phone being vulnerable to attack will be displayed. Select OK to continue if you

trust the APK file you are about to download. You can change this setting back after the

current installation is complete.

4. Turn on “USB debugging” on your phone: open the Applications menu and select Development,

then enable USB debugging.

5. Open a command/terminal window:

• On Windows, select Start > Run> then type ‘cmd’.

• On Mac OS X, open the Applications folder, select Utilities, then Terminal.

• On Linux, select Applications > Accessories > Terminal.

6. In the command/terminal window, enter the following command:

adb install <APK_FILE_PATH><APK_FILE>

2. Functional Testing:

Testing the functionality of the application with respect to given requirements of the application.

2(a). Application LOGO Test: Testing the logo of the application to check whether the app which is under test have used the proper logo as per the requirement specification or not.

2(b). Application Splash Screen Test: To verify that when user selects application logo in application manager splash is displayed.

Note that Splash do not remain for more than 3 seconds.

2(c). Application Background Image Test: To test whether the application under test is using the proper Background image as per given requirement specification or not.

2(d). Font style / size / color: Testing the Font size/style/color as per requirement specification.

2(e). Layout: Testing the layouts with respect to given requirement specification.

2(f). Back Key: Verify that back key should navigate the user to previous screen or should close the application with proper exit popup dialog(Again it depends on Requirement specification).

2(g). Application Start/Restart:

i. Find the application icon and select it

ii. Observe the application launch In the timeline defined.

iii. Application must not take more than 25s to start

2(h). Exit Application: Verify that user is able to exit from application with every form of exit modes like Flip, Slider, End Key or Exit option in application and from any point.

3. Memory Leakage Testing

Memory leakage happens when a computer program or application is unable to manage the memory it is allocated resulting in poor performance of the application and the overall slowdown of the system. As mobile devices have significant constraints of available memory, memory leakage testing is crucial for the proper functioning of an application.

4. Interrupt Testing

An application while functioning may face several interruptions like incoming calls or network coverage outage and recovery. The different types of interruptions are:

Incoming and Outgoing SMS and MMS.

Incoming and Outgoing calls.

Incoming Notifications.

Battery Removal.

Cable Insertion and Removal for data transfer.

Network outage and recovery.

Media Player on/off.

Device Power cycle.

An application should be able to handle these interruptions by going into a suspended state and resuming afterwards.

5. Usability testing

Checking the user-friendliness of the application is known as Usability testing.

We have to verify if the application is achieving its goals and getting a favorable response from users. The application should have to give the results in very few steps or in few clicks.

The best example for this is: If you are booking a movie ticket by using some application, user should get the ticket booked in a very short amount of time / only by using 3-4 activities maximum!!

6. Certification Testing

Use this command : (Jarsigner is in your Java bin folder goto java->jdk->bin path in cmd prompt)

$ jarsigner -verify -verbose -certs my_application.apk

If you see "CN=Android Debug", this means the .apk was signed with the debug key generated by the Android SDK (means it is unsigned), else u will find something for CN. for more details http://developer.android.com/guide/publishing/app-signing.html

How do developer signs their apps:

He/She creates a keystore file by using the below cmd:

$ keytool -genkey -v -keystore my-release-key.keystore
-alias alias_name -keyalg RSA -keysize 2048 -validity 10000

To show you how it works I have given a screen shot of creating one below:

After generating key we have to follow the following steps:

Right click on project > Android Tools > Export Signed Application Package

The Export Android Application wizard appears.

Select the project I want to export, click Next.

The Keystore Selection screen appears.

Select the keystore and enter the password.

After this just give the path of the .apk file that has to be released.

7. Performance Testing

This testing process is undertaken to check the performance and behavior of the application under certain conditions such as low battery, bad network coverage, low available memory, simultaneous access to application’s server by several users and other conditions. Performance of an application can be affected from two sides: application’s server side and client’s side. Performance testing is carried out to check both.

This is done by performance test engineers. They use specific tools for this, for example: LoadRunner, Apache JMeter etc...

8. Integration Testing

Testing the data flow between two modules(activities) is called to be as Integration Testing.

This is done after finishing of Functional Testing.

The reason why we do Integration Testing is to make sure that all the activities are connected together properly or not.

9. System Testing

It is a end to end testing of the application where in Testing Environment is similar to production.

Here we test the data flow from the beginning to the end, If something is broken we have to report it as a bug.

We perform system testing after finishing of Integration Testing.

We perform system testing to make sure that end to end scenarios of the application is working properly or not.

10. Accessibility Testing

Accessibility testing is a subset of usability testing where the users under consideration have disabilities that affect how they use the application. The end goal, in both usability and accessibility, is to discover how easily people can use application and feed that information back into improving future designs and implementations.

This testing is done after completion of system testing.

11. Adhoc Testing(Monkey Testing)

Testing the application in a random way is called to be as Adhoc or Monkey Testing.

Monkey Testing is done after completion of full software testing and reporting of all the bugs is done. And also when the product is almost stable.

The reason why we perform this testing is,

To some how brake the product.

To find more number of bugs.

To make the software more stable.

to be continued...