Tuesday, July 29, 2014

Need for Emulators

Mobile apps and mobile internet usage is growing exponentially. As more and more companies roll out mobile business-critical applications, such as mobile banking, commerce or health apps. Accordingly, companies require mature mobile testing solutions that allow them to deploy and support their mobile application development in a timely and cost-effective manner, while reducing their risk exposure.
Emulators are virtual mobile device that runs on your computer and it helps you develop and test applications without using a physical device.
Emulators are available and are widely used for both manual and automated mobile application testing. They are powerful tools for developing mobile applications; they have 
unique features which enable them to provide a rich set of development tools as well as an integrated debugging environment and in most cases are available for free from the vendors.
Emulators are broadly divided into OS Emulators like Android sdk , Device Emulators and Browser emulators.

  • OS Emulators: These are emulators which are provided by the operating system providers like Windows Mobile emulators by Microsoft and emulator for Android by Google. These can help you in testing your mobile applications and mobile.
  • Browser Emulators: These are the emulators (user agents) which comes in chrome and safari browser by default & as a plugin for Firefox and IE cab simulate mobile browser environments. They are useful verifying the functionality available in a particular mobile browser on that particular device, helpful in mobile website testing and you cannot test mobile applications (native & Hybrid) on it.
  • Device emulators: These are generally provided by device manufacturers and simulate the actual device. They are really helpful for testing on that particular device. 

Benefits of Emulators:
  • The most obvious advantage is price. In most cases, mobile emulators are completely free. All you need to do is download the software, install on your PC, and you're ready to go.
  • There are specific situations where the deadline to produce text execution results are short and purchasing the required mobile devices may be not possible. Thereby it might be necessary to use the emulator/simulator in these circumstances for testing the relevant mobile applications which need to be tested
  • The emulator is usually part of the SDK provided to developers. Due to their integration with the development environment, mobile emulators provide the developer or tester with access to detailed information such as debugging information which is very important for the development phase. This allows for convenient step-by-step debugging of your application on the emulator.
Limitations of Emulators:
  • Emulators are slow in comparison to real devices.
  • Emulators are not reliable as it cannot emulate the actual device behaviour of real devices as it uses the memory and processors of the computer on which they are installed which are generally powerful in comparison of real devices.
  • You cannot test low battery, battery removal scenarios on emulators.
  • Real time interruptions from call and SMS cannot be tested on emulators.
  • You cannot test network specific behaviours like how application behaves on 2G, 3G, Wifi networks.
  • You cannot test the emulators on the move.
  • You cannot test the camera features on emulators
  • The emulator cannot properly emulate the exact colour display of the devices when the real device is in sunlight or in black
In order to ensure high quality with respect to network issues, location-based services and true user experience, it is recommended to test application on both emulators and real devices. 

How to enable developer options on Android 4.2 and Above

Android OS developers at the time of release of OS 4.2 made a change in settings section due to which developers options are hidden in new phones running on OS 4.2 & above, this option is very useful for developers and testers for capturing logs etc.
Steps for enabling developers option:
  • Go to Settings section on device.
  • Tap on About phone
  • Look for “Build number” row under About phone
  • Tap on Build number for 7 times then you will see “You are now a developer” toast appear on screen 
  • Now tap on back and you will see Developers options above About phone 
  • Tap on Developers options.
  • Look for USB debugging option and tap on check box, you will see a popup, tap on ok
  • Now you can use this device for testing and log capturing using monitor tool or adb command of android sdk.


Monday, July 21, 2014

Types of Testing for Mobile Application Testing

a) Functional Testing: The functional testing of any app consist of the implementation of the required functionality for the implementation of a mobile app. It consist of three sub-characteristics which lead to different types of tests like Completeness of all required functionality, Accuracy of data processed by application and Suitability of application for the intended use.
It also take cares of synchronization and resource sharing to avoid conflicts and deadlocks when we work with client server architecture applications.
b) Security Testing: In security testing the encryption/decryption technique of application is taken into account with the facility that sensitive should store on device should always appear in encrypted form and if application require that data for verification only then it should not store data like passwords/PIN codes.
We also verify that when working with multi user support application that in simultaneous transactions or requests that data should not interfere with each other.
The app has to be resistant against threats like listed in Microsoft’s “STRIDE” model (Spoofing, Tampering, Repudiation, Information disclosure, Denial of service, Elevation of privilege)
If application supports payment transitions than it must confer with Payment Card Industry Data Security Standard (PCI DSS) and Payment Application Data Security Standard (PA DSS) guidelines.
c) Performance Testing: User expectations in the speed of a mobile app is often higher than that in a comparable desktop application, the hardware is less powerful than a desktop PC, this leads to a high demand for performance optimization. The performance of application can vary because of bandwidth and latency of the data network affect the speed of data transfer and delays in the app sending and receiving data, for client-server or cloud apps, the performance of the server also influences the performance of the app and performance of the device itself limits the execution speed of the app code.
d) Usability Testing: This includes text visibility in the selected language, navigation between screens, and verification of functionality, Clear UI design, memorable navigation paths and transparency of the app state are fundamentals for good usability.
e) Compatibility Testing: This entails validating the application for different mobile devices, OS versions, screen sizes, and resolutions as per the requirements, checking if integration server changes, checking the app isolation with other apps on the device.
f) Marketplace guidelines compliance Testing: Depending on the App Store Provider, an app has to pass certain release checks before being published. Minimal review procedures cover malware checks and identity verification of the developer. Other stores, like e.g. the Apple AppStore, provide extensive rule sets of checkpoints to be adhered to.
It must be integral part of a mobile development and test strategy to early test for these checkpoints in order to minimize the risk of rejection by the store review team.
g) Robustness Testing: The application should have ability to handle wrong input, low memory, interrupt by incoming calls or messages, sending the app to the background and then launching app, using application in low memory scenarios & should give proper message as and when required, power off/battery drainage which leads to turning off  the device while using app etc.

h) Localization Testing: The application should have ability to work with different language settings and application should work fine in different date formats, different phone number formatting etc

Friday, July 18, 2014

Device Selection for Testing

Emulators and Simulators: Use of emulators & Simulators for testing is a cost effective solution but these have their own limitations as all features of app like camera etc cannot be tested on these.
They are also very useful in terms of usability, and especially design, including data input, screen size, button use, etc. 

Cloud Testing Solutions (Remote Real Devices):  The QA team can use the mobile cloud computing environment to deploy and test an application. In the cloud approach, the task and data are kept on the Internet rather than on an individual device, providing on-demand access. By reducing the complexity of the implementation, companies that take advantage of cloud services can significantly reduce project costs and boost the return on investment of a mobile computing solution. 

The big players in cloud testing solution are:
1. DeviceAnyWhere(http://www.deviceanywhere.com)
2. Perfecto Mobile (http://www.perfectomobile.com)
3. Appthwack (https://appthwack.com)

Real Devices:  The QA team should use real device for testing app before release as this is most important since the Mobile application will always be used on mobile devices by end users who may access the application from a remote area with fluctuating network signal strength.
One of the biggest challenge in mobile application testing is selection of mobile devices for testing, the selection of mobile device involves various criteria like OS Version, Display Density, CPU type, memory etc.

When testing enterprise applications, a user survey or device model data from internal systems can be a good source of information to determine the mix of target devices for testing.

Criteria in which we can select whether we should go for manual or automation testing

  1. If we have to only testing once: We should Use manual testing –if only one function of one mobile app is being tested, it doesn’t make sense to spend the time and energy to create an automated testing script. Although manual testing may take longer than running an automated test, script creation takes time. If there isn’t a case for re-use, there is really no need to tie up automation experts with script creation for a single test case.
  2. Regression tests: We should Use automation testing – Each time a developer releases new code, a regression test is needed. Because regression tests are repeated, automated testing is a perfect fit. While there is some time needed on the front end to develop test scripts, testers will save time because they won’t have to start from scratch with the test each time. We should try to create our script in such a way that most common functionality test scripts should be created in such a way that we can reuse them in other projects also whenever we encounter same problem.
  3. Complex tests scenarios: We should Use automation testing – Complex tests have multiple components that need to be tested at once. After testers familiarize themselves with the app’s functionality, an automated test script can help them run through a variety of tests quickly to speed the testing process. 
  4. New functionality: We should Use manual testing – because If an app contains new functionality, it should be tested manually. With new functionality, testers won’t know what type of automated test script to write prior to performing a manual test.