Testing applications for mobile phones is difficult, time-consuming, and hard to do effectively. Many people have limited their testing efforts to hands-on testing of an application on a few physical handsets, and they have to repeat the process every time a new version of the software is ready to test. They may miss many of the permutations of real-world use, and as a consequence their users are left with the unpleasant mess of a failing application on their phone. Test automation can help to increase the range and scope of testing, while reducing the overhead of manual testing of each version of the software. However automation is not a panacea, particularly for mobile applications, so we need to pick our test automation challenges wisely. This book is intended to help software and test engineers pick appropriately to achieve more; and as a consequence deliver better quality, working software to users. This Synthesis lecture provides practical advice based on direct experience of using software test automation to help improve the testing of a wide range of mobile phone applications, including the latest AJAX applications. The focus is on applications that rely on a wireless network connection to a remote server, however the principles may apply to other related fields and applications. We start by explaining terms and some of the key challenges involved in testing smartphone applications. Subsequent chapters describe a type of application e.g. markup, AJAX, Client, followed by a related chapter on how to test each of these applications. Common test automation techniques are covered in a separate chapter, and finally there is a brief chapter on when to test manually. The book also contains numerous pointers and links to further material to help you to improve your testing using automation appropriately.
Author(s): Julian Harty, Mahadev Satyanarayanan
Series: Synthesis Lectures on Mobile and Pervasive Computing
Edition: 1
Publisher: Morgan & Claypool Publishers
Year: 2009
Language: English
Pages: 120
A Practical Guide to Testing Wireless Smartphone Applications......Page 2
Synthesis Lectures on Mobile and Pervasive Computing......Page 4
Keywords......Page 6
Preface......Page 7
What Is Inside......Page 8
Conventions......Page 9
What You Will Need......Page 10
Using Code Examples......Page 11
Alphabet Soup and the Half-life of Links......Page 12
Acknowledgments......Page 13
Contents......Page 15
1.2 CLASSIFICATIONS OF MOBILE WIRELESS APPLICATIONS......Page 21
1.2.3 Browser Applications......Page 22
1.3 CURRENTLY OUTSIDE THE SCOPE OF THIS BOOK......Page 23
1.5 CHALLENGES IN TESTING MOBILE WIRELESS APPLICATIONS......Page 24
1.6 PROBLEM SPACE......Page 25
1.6.1 Transcoding Web Content......Page 26
1.7 OUR TESTING FOCUS......Page 28
1.8 OUR GOALS WHEN TESTING......Page 29
1.9 OUR OVERALL TESTING STRATEGY......Page 30
1.10 CORE CONCEPTS......Page 31
chapter 2 Markup Languages......Page 33
2.1 EXAMPLES OF MARKUP LANGUAGES......Page 34
2.2 TESTING STRATEGY FOR MARKUP APPLICATIONS......Page 36
2.3 EXAMPLE PROBLEMS......Page 37
3.1 GETTING STARTED WITH TEST AUTOMATION......Page 41
3.2 EXAMPLES WRITTEN IN PYTHON......Page 42
3.2.1 A Test to Detect if Google Maps Is Offered to Mobile Users......Page 45
3.2.2 Using Regular Expressions in Our Test......Page 46
3.2.4 Using XPATH in Our Tests......Page 47
3.4.1 Data-Driven Tests......Page 49
3.4.3 Using Metadata......Page 50
3.4.4 Test Using Carrier Networks......Page 51
3.4.6 Implementing Rule-Based Tests......Page 52
3.4.8 Strengths and Weaknesses of Rule-Based Testing......Page 53
3.4.10 Is Appropriate Content Being Served?......Page 54
3.6.2 “Mobile Readiness” Tools......Page 55
3.6.3 Utilities to Help With Testing Browser Applications......Page 56
chapter 4 AJAX Mobile Applications......Page 57
4.2 EXAMPLES OF PROBLEMS WITH MOBILE AJAX APPLICATIONS......Page 59
5.1.2 WebDriver......Page 61
5.1.4 Limitations of Using Desktop Web Browsers......Page 62
5.4 General Tips......Page 64
5.4.2 WebDriver Tips for Mobile AJAX Automation......Page 65
6.1 PORTABLE APPLICATIONS......Page 67
6.2.1 Developing Native Applications......Page 68
6.3 TESTING STRATEGY FOR CLIENT APPLICATIONS......Page 69
7.1 AUTOMATED UNIT TESTS......Page 71
7.1.2 Running Unit Tests in an Emulator......Page 72
7.3 CODE INJECTION......Page 73
7.3.1 Code Injection for Java ME......Page 74
7.4 PROBER CLIENTS......Page 76
7.5 SIGNATURE TESTING......Page 77
7.6.2 Test Automation of the Runtime Environment......Page 78
7.6.3 Emulators......Page 79
7.7 TEST AUTOMATION USING THE BLACKBERRY EMULATOR......Page 82
7.7.1 Summary of Testing Techniques for Client Applications......Page 83
8.2.1 Steps in Image Stitching......Page 85
8.2.4 Encoding Data in Pixels......Page 89
8.2.5 Making Image Matching Easier......Page 92
8.2.7 Detecting Good and Bad Results......Page 93
8.3.1 Using Transparency Masking......Page 94
8.4 Model Based Testing......Page 96
9.1 EXAMPLES OF EFFECTIVE MANUAL TESTING......Page 99
9.4.1 Browser-Based Applications......Page 100
9.4.4 General......Page 101
chapter 10 Future Work......Page 103
A.1 TESTING MARKUP (WEB SITES)......Page 105
A.2 J2ME TESTING......Page 106
A.5 TEST AUTOMATION WITH EMULATORS......Page 107
A.9 COMMON TOOLS......Page 108
A.11 RAW INGREDIENTS......Page 109
Appendix B Data Connectivity......Page 111
B.4 MISCELLANEOUS PROBLEMS......Page 112
C.3 CONNECTING YOUR MODEM OR PHONE......Page 113
C.7 CONFIGURING PPP IN LINUX......Page 114
Author Biography......Page 119