Test Cases for Mobile Application Testing
Photo by Obi Onyeador on Unsplash
When it comes to the mobile application development process, testing is one of the most important phases. It ensures that the application is functioning properly at all times. Having said that, this phase is often neglected as writing test cases requires determination and effort from the team.
You should keep the following things in mind when writing test cases for mobile device testing:
- Keep it simple and short.
- No overlapping among different test cases (prevent any duplication or repeated tests).
- Include all the possible outcomes (both positive and negative probabilities).
- Practice proper version control with the underlying codebase.
- Utilize the continuous integration and continuous deployment (CI/CD) pipeline.
Give higher priority to testing using un-rooted real devices.
Typically, test cases are categorized into the following levels:
- Level 1: Rough test cases based on user documentation and other available information, such as specifications. This is usually done at the initial stage of development, and assumptions are heavily involved.
- Level 2: Practical test cases based on actual features and workflows of the mobile application.
- Level 3: Grouping multiple relevant test cases into a single test procedure.
- Level 4: Moving test cases from manual testing to automated testing.
Mobile application testing is often conducted via an automation framework depending on the operating system and programming languages. The most popular frameworks are:
- Appium (Java with JUnit)
- Espresso (Android only)
- XCUITest (iOS only)
- Xamarin.UITest
- Calabash
This article focuses on the best practices and things to keep in mind when writing test cases. Test cases can be grouped into different types depending on your use cases. For example:
- Performance
- Functionality
- Recoverability
- Usability
- Compatibility
- Security
- Localization
Performance Testing Test Cases
The main purpose of this test is to ensure that your mobile application is able to perform reasonably under a heavy load or sudden spike of access by users. The test should check for the following:
- Does the application function as expected when accessed by a large number of concurrent users?
- Is the response time as expected when accessed by users?
- Can the device handle the outgoing and incoming projected load volumes?
- Are there any memory leaks when the application is experiencing unusual usage (e.g., when it's being run continuously for a long time)?
- Is the battery consumption within the expected range when the application is being run?
- Is the camera/microphone/GPS functioning as expected?
Image taken from Onix-System
It should also include performance related to internet and network connectivity:
- Are there any performance issues on the device when using different networks (WiFi, 2G, 3G, 4G, 5G, etc.)?
- Are there any performance issues when changing from one network to another?
Functional Testing Test Cases
As the name implies, this type of test focuses on testing the bread and butter of your mobile application. The main objectives are ensuring the quality of your mobile application and reducing the possibility of errors.
This texting aims to ensure that customers are satisfied with your application. Test cases should check for the following:
- Does the application work as intended on different mobile devices and OS versions (Android, iOS, etc.)?
- Are users able to download and install the application without issue across various platforms (Google Play, Apple Store, etc.)?
- Does the application continue to work when there are external interruptions (incoming messages, incoming phone calls, etc.)?
- Does the application work as intended when switching from foreground to background and vice versa?
- Does the application or device support payment gateway transactions?
- Are users able to update or reinstall the application without issues?
Recoverability Testing Test Cases
Recoverability testing involves test cases where there are unexpected interruptions or crashes while running the mobile application. Such testing should check for the following:
- Does the application resume at the last operation, or does it go back to the main page if there is a system crash or a hard reboot on the device?
- Is the application able to handle a transaction as expected during a power failure?
- Does the application re-establish connection when the network connection is interrupted?
- Can the application recover data (backup)?
Usability Testing Test Cases
Usability testing revolves around the ease of use and user-friendliness of the mobile application. Testing is usually done manually since human input and feedback are required to ensure that the application is comfortable and sensible for users of different age groups and nations.
Image taken from NN Group
Most of the tests are related to user interface and their intuitiveness:
- Are the styles and themes consistent in the entire application?
- Are the buttons and input locations user-friendly?
- Are the icons clearly distinguishable from each other?
- Is the text clearly visible, readable, and not too difficult to read?
- Does the application provide support for users with disabilities?
- Can users easily navigate within the application, especially those with big fingers?
- Are there any prompts or message feedback for important tasks such as downloading and deleting content?
Compatibility Testing Test Cases
This type of testing serves to ensure that your mobile application works as intended on different commonly-used devices. This is mainly because different devices have different resolutions, operating systems, hardware components, etc.
Compatibility testing also tests the minimum requirements or specifications that are required to run your mobile application. Keep the following questions in mind when writing the test cases:
- Are the text/buttons/controls clearly visible and accessible when running on devices with different resolutions?
- Are the text and emojis rendered properly on different operating systems and devices?
- Do the camera/microphone/GPS and functionalities that use hardware components work as intended across different devices?
Security Testing Test Cases
Users often lay great emphasis on the security of a mobile application. Failure to provide security assurance can be catastrophic and detrimental. Hence, the main objective of security testing is to ensure that your mobile application is secured from hackers and the data is handled properly according to legal guidelines. These guidelines include data protection laws, like the General Data Protection Regulation (GDPR).
Here are some questions that your test cases should provide answers for:
- Does it have proper authentication processes when accessing sensitive content (2FA, token, etc.)?
- Are the communications with the server (back-end) secured (HTTPS, WSS, etc.)?
- Does the server have protections against denial of service (DDoS) attacks?
- Is the application secured against malicious runtime, SQL, and client-side injections?
- Are the password and sensitive content properly encrypted or hashed?
- Does the application have any preventive measures against brute force or time attacks?
- Is the data handled in accordance with local data protection laws?
- Are there alerts or protocols in place for cases where the server is compromised or a data breach occurs?
Localization Testing Test Cases
When catering to markets across different regions, localization is an important aspect. It provides a great user experience. As a result, proper localization testing is needed to weed out issues that might arise due to inaccurate translations.
Consider the following points when writing test cases for localization testing:
- Are the translations accurate and correct?
- Is the text properly formatted based on the locale? (whitespace, punctuation, left-to-right and right-to-left style, etc.)
- Are the date and time correctly displayed based on the locale and location of users?
- Does the application use the correct currency and conversion rate?
- Does the application use the correct symbol and colors when conveying the message?
- Is the terminology used consistent across the application?
Conclusion
Let's recap what you have learned today.
This article started with a simple explanation of the best practices of writing test cases. It also covered the different levels of testing.
Then, it focused on different types of testings in the subsequent sections and the objectives of each testing: performance, functionality, recoverability, usability, compatibility, security, and localization.
Finally, it discussed a few examples and things to consider when writing test cases for each type of testing.
Thanks for reading this piece. Have a great day ahead!
When I initially left a comment I appear to have clicked the -Notify me when new comments are added- checkbox and now each time a comment is added I receive four emails with the exact same comment. There has to be an easy method you can remove me from that service? Kudos!
https://infocampus.co.in/web-development-training-in-bangalore.html
https://infocampus.co.in/web-designing-training-in-bangalore.html
https://infocampus.co.in/front-end-development-course-in-bangalore.html
https://infocampus.co.in/reactjs-training-in-marathahalli-bangalore.html
https://infocampus.co.in/javascript-jquery-training-in-bangalore.html
https://infocampus.co.in/ui-development-training-in-bangalore.html
This comprehensive tutorial-based article highlights on How to Write Test Cases, and explains the significance of what a Test Case is, and outlines Test Case Design techniques. Na Wai Foong! Incredible insights! This article begins with an explanation of the best practices for writing test cases. It also discusses the various levels of testing. The following sections focus on different types of testing and the objectives of each testing: performance, functionality, recoverability, usability, compatibility, security, and localization.
Finally, it went over some examples and things to think about when writing test cases for different types of testing. At this point, I would like to add a few more articles that would provide more insights into the topic discussed. https://bit.ly/3Ox1WNa