These are the slides from my keynote talk at the Mobile App Europe conference 2014 in Potsdam. Unfortunately, I was not able to give the talk because of sickness, but nevertheless I want to share the slides with you guys. If you have any questions, don't hesitate to get in contact with me.
Advancing Engineering with AI through the Next Generation of Strategic Projec...
How to Break your App - Best Practices in Mobile App Testing
1. Customer Visual
How to Break your App -
Best Practices in Mobile App Testing
Daniel Knott | @dnlkntt
1 29. September 2014
2. Who am I ?
• Daniel Knott
• Software Test Manager/ Mobile Tester @AOE
• Mobile Testing since the end of 2010
• Before AOE, Team Lead QA @XING Mobile Team
• Blogger and Speaker
http://www.adventuresinqa.com
http://www.linkedin.com/pub/daniel-knott/1a/925/993
https://www.xing.com/profile/Daniel_Knott
@dnlkntt
4. Intro
Current Status
Mobile Challenges
The Customer
Mobile Specific
Testing
Mobile Pyramid
Tools
5. 5 29. September 2014
I Current Status
Author: Barry Caruth, https://www.flickr.com/photos/caruth/8401943928/
6. Current Status | Some Numbers
2+ millions apps available
100+ billion downloads
80% – 90% of apps are deleted after the first usage
56% of apps that requires a registration gets deleted
Average user checks device 150 times per day
45% are not well tested
7. KIFSU – To Remember the important Things
K I F S U
Keep It Fast Simple Useable
9. Mobile Challenges | All known!?
http://opensignal.com/reports/2014/android-fragmentation/
10. Mobile Challenges | All known!?
http://opensignal.com/reports/2014/android-fragmentation/
11. Mobile Challenges | How to handle fragmentation
Know the target group
Group your devices, A B C
Test only on those devices
Test on real device
Don’t use simulators or emulators
12. Mobile Challenges | How to handle fragmentation
Group 1, Prio A
• High End
Devices
• Dual/ Quad Core
CPU
• RAM >1024MB
• Retina, Full HD
Display >= 4,5“
Group 2, Prio B
• Mid-range
devices
• Dual Core CPU
• RAM <1024MB
• Screen size <= 4“
• Software not
older than 1 year
Group 3, Prio C
• Small devices
• Single Core
• RAM < 512MB
• Low screen size
and resolution
• Older OS, older
browser
Based on your target group
13. Mobile Challenges | More…
Author: Davide Vizzini Limbte, http://www.flickr.com/photos/limbte/4007115435/
Author: Juan de Dios Santander Vela, http://www.flickr.com/photos/juandesant/209098053
Author: Rain Rabbit, http://www.flickr.com/photos/37996583811@N01/8033259053/
14. 14 29. September 2014
I The Customer
Author: Michael Newman, https://www.flickr.com/photos/mzn37/1226016289/
15. The Customer | Better know them
Know the target group
Will downsize testing effort
Talk to your customer
Do usability testing with them
Author: Grzegorz Lobinski, http://www.flickr.com/photos/gregloby/3515990945/
Invite them to a beta testing program (Sonos, FB,
Twitter)
16. 16 29. September 2014
I Mobile Specific Testing
Author: Theus Falcao, http://www.flickr.com/photos/theusfalcao/9563767145/
17. Mobile Specific Testing
Known functional testing is still required
• Boundary values
• Equivalence classes
• Testing against acceptance criteria
Test the app as black box
• Try to break it
• Be creative and think in edge cases
18. Mobile Specific Testing
Author: Juan de Dios Santander Vela, http://www.flickr.com/photos/juandesant/209098053
Author: Ian Britton, http://www.flickr.com/photos/freefoto/728651045/
Author: @Doug88888, http://www.flickr.com/photos/doug88888/7149187135/
Author: Moyan Brenn, https://www.flickr.com/photos/aigle_dore/5626341059/
Author: Dan Levy, http://www.flickr.com/photos/danlevy/5607259711/
19. Mobile Specific Testing
Author: amateur_photo_bore, http://www.flickr.com/photos/andresv/233667770/ Author: Rain Rabbit, http://www.flickr.com/photos/37996583811@N01/8033259053/
Author, Daniel Sancho, http://www.flickr.com/photos/teclasorg/2852716491/
20. Mobile Specific Testing
Author: Surat Lozowick, http://www.flickr.com/photos/suratlozowick/4311105154/ Author: Surat Lozowick, http://www.flickr.com/photos/suratlozowick/4464587302/
Author: Theus Falcao, http://www.flickr.com/photos/theusfalcao/9563767145/
21. Mobile Specific Testing
Android
• JouleUnit, to measure battery usage
• Monkey, to stress test the app
iOS
• Energy Usage in Instruments
• UI AutoMonkey, to stress test the app
22. Mobile Specific Testing
Author: Molly Holzschlag, http://www.flickr.com/photos/mollyeh11/272434559/ Author: Quinn Dombrowski, http://www.flickr.com/photos/quinnanya/4718635484/
23. Mobile Specific Testing
Author: minxlj, http://www.flickr.com/photos/minxlj/3270996158/ Author: Ryan B. BulaPhotography, http://www.flickr.com/photos/nayralub/3763581778/
Author: Sterling Coffey, http://www.flickr.com/photos/n0ssc/7046915929/
24. 24 29. September 2014
I Tools
Author: OZinOH, http://www.flickr.com/photos/75905404@N00/7126147125/
27. Mobile Test Pyramid
Unit Tests
Beta Tests
End2End Tests
(UI Tests)
Manual Tests
28. Tools
Do test automation!
Don’t buy huge test automation tools
Start simple and discover different tools
No tool is perfect
See which tool fits in your development environment
29. Tools | Android
Robotium (ExtSolo)
Spoon
Selendroid
Calabash for Android
Robolectric
Espresso
Monkey
MonkeyTalk
Appium
Great mobile tools provided by the company square: http://square.github.io/
30. Tools | iOS
UIAutomation
Keep It Functional
MonkeyTalk
Calabash for iOS
ios-driver
Kiwi
XCTest
Appium
31. 31 29. September 2014
I Security
Author: Alexandre Dulaunoy, http://www.flickr.com/photos/adulau/7712545428/
32. Security
Author: Anthony Catalano, http://www.flickr.com/photos/badwsky/34164244/
Author: Dennis Wong, http://www.flickr.com/photos/denniswong/2406135310/
Âuthor: orkomedix, http://www.flickr.com/photos/orkomedix/5211437958/
33. Security
Security testing is not easy
Get help from experts
Think twice about app permissions
Check the OWASP mobile security page
https://www.owasp.org/index.php/OWASP_Mobile_
Security_Project
35. Mobile Specific Testing | Summary
Be creative and on the move while testing mobile apps
Combine your in house testing with crowd testing
Be up to date! Know your target group
Keep the mobile features in mind
Keep the mobile test pyramid in mind
Do test automation and know the right tools
36. Thanks for your attention!
More information about mobile testing
can be found in my book
„Hands-On Mobile App Testing“
which will be available very soon.
www.handsonmobileapptesting.com
Hello and Welcome to the second day of the Mobile App Europe
What a great first day yesterday! I hope you enjoyed it
Today I want to start the day with the following topic:
Currently software test manager @AOE, Mobile Testing for a big german telecommunication provider. Testing iOS, Android and BlackBerry Apps
Mobile Tester since end of 2010
Build up the mobile testing team @XING
Mobile test automation for iOS and Android
Get in touch with me over the provided social links
IT agency since 1999
150 employees, HQ Wiesbaden, SFO, Zürich
Background TYPO3 and Magento
Own Search product ‚Searchperience‘
Enterprise e Commerce shops e.g. Angry Birds Webshop, QVC
Enterprise CMS Systems: Congstar
Sony Entertainment System
ConnectedCar, Mobile Apps
Enough marketing! Lets get started
Intro shows the topic I will cover today in this presentation
For each topic I will give some best practices
Lets get startet. If you have questions just ask them
Some number about the mobile world, numbers based on different reports e.g. Gartner, Compuware and World Quality Report
Every 6 minutes an AVG. User is checking his smartphone, thats more than 150 times a day!
Check numbers in september again, after Goolge IO and WWDC
Number from Gartner, Comupware and World Quality Report
Every 6 minutes an average user checks the device!
Not tested in terms of functionality, usability, performance or security
This numbers are still increasing
Usage is amazing every 6 minutes
It is easy to loose customers more than half of the apps are not tested.
I created my own mobile principle KIFSU
Follow the 3 simple rules Fast, Simple and Useable and your customer will be happy
Lets get to the challenges
I think most of you know the biggest challenges already
I think you all know the biggest mobile challenge! You can hear this in nearly every mobile report, post, article
Software and Hardware Fragmentation, different CPU, RAM, Camera, Battery, Screensize, Density
iOS Fragmentation is also there!
Two new form factors with the iPhone6 and iPhone 6+
But also keep the different Software Versions in mind
But there are more challenges than just the fragmentation
But how to handle the fragmentation?
In the projects I was working on we used the following approach to downsize the effort in device fragmentation
Lets have a look at the grouped devices
Group Devices into A B C
Group or grading is different for every app
Create groups based on your target group
Keep in mind, this is an ongoing process!!!
Handling the devices in an mobile team could be a full time job! It is not just buying a device, the devices needs to be maintained, updated. You need to buy new phones as well.
Don‘t underestimate the efforts here.
If you don‘t want to buy phones, you can rent them. Open Device Labs, Cloud Devices!
There are of course mobile challenges
For example if you think about the language different languages have different length and characters they must fit all in the app and screen size
The Network: The app must also work in slow networks like EDGE or GPRS as well as 3G, LTE and Wifi. What happen when the connection is getting lost?
Sensors: Mobile Phones have several sensors on board, tilt, motion, light and many more. Keep them in mind while testing.
More challengs will be shown later in this presentation in the section mobile specific testing there are also the best practice shown
The is also a challenge when developing a mobile app!
If you don‘t know your customer you don‘t know what to develop and on which platform to test
Why is the customer here a big challeneg? Any ideas? Because Mobile users have a much higher expectation to mobile apps than to any other software like browser based applications
Get to know the customer
Best Practices
Know your target group.
With that knowledge you can downsize the dev and testing effort. Because you know the devices of your customers and their needs
Talk to them! Invite them to your company and talk to them (not all of course :D)
Then do usability testing with them
Invite them to be a beta tester. For example I tested the Sonos App in a beta program. Was a nice approach to feel valuable as a customer
Create Personas based on your target group
- Lets come to mobile specific testing.
First of all, the known testing techniques are also valid for mobile apps
Like boundary testing, equivalence classes, acceptance criteria
In the mobile challenge slides I already mentioned the fragmentation, language and the network
Be mobile and on the move while testing your app.
Test your app in the real environment!
Test in data networks!
To handle network scenarios do Mobile Field Testing
Test the app in the city, in the country side, while commuting to work, in the park, at home be mobile
Test the app also in the environment the app is made for. When testing sports app, do sports :)
When testing e.g. a skiing app, be on the slope!
Network situations are hard to automate. Simulating them is ok but not enough
Test also more network provider
If you don‘t have the time for doing that kind of field testing, use the crowd! They can offer you that kind of stuff.
Test the device specific hardware
1. Camera. Different Vendors == different cameras and resolutions. Even in iPhones different cameras are installed
2. Test the sensors that are used by your app. Tilt sensors, motion sensor, light sensor, shake the phone etc.
GPS testing, check that used GPS is released by the app again to save battery
3. Memory, test if your app can be stored on sdk card on android. Test how your app behave when the local phone storage empty, full is no crashes? Proper error message?
Put lots of data to your device and see how it behaves
1. Test the battery consumption of your app.
Charge the app before testing to 100% and mesaure every 10 minutes the current battery state
Use tools for measure the battery. There are some tools on the market.
Also use an nearyl empty phone for testing and see how the app is performing. Some phones switch off some sensors to save battery, can your app work with that?
2. Start the app and leave the phone in standby mode, open the app again, is the app still working? Maybe triggering a reload to get the latest data from the backend
Start the app from multitask switch off the network plane mode!?
3.Test different interrupt notifications, incomming sms, mms, phone call usw. If your app supports push notifications open the app and send a push notification check the handling.
Use tools like JouleUnit (Android)
On iOS use the Energy Usage Function of Instruments
Monkey for Android to stresstest your app and see the handling of the interrupts
UI AutoMonkey for ios
There are some tools that help you analyzing the battery consumption of your app. And tools to stress test your app
Use tools like JouleUnit (Android)
On iOS use the Energy Usage Function of Instruments
Monkey for Android to stresstest your app and see the handling of the interrupts
UI AutoMonkey for ios
On this slide there is one category that most of the people don‘t care. But in some apps it makes really sense.
1. Do usability testing
Invite people to test your app
Starbucks test
Test early versions, prototypes, skribbles
2. Think of handycaped people (blind) and do some accessibility testing (screen readers, color testing)
Use the build in screenreaders! At least try to think at those people
In my current project the iOS app needs to fully accessable. This was really hard to develop and to test. You need to think of the contrast and the colors of the app. Every part had to be tested with a screenreader and so .
Keep this point in mind or try it tomorrow
1. Test the update process of your app
Check that user is still logged in
Check that data is still the same
Check that database changes will not affect the current data
Test the update from an older version to the current version
2. Do performance testing
Hard to do manually, but compare at least the old with the new version in terms of loading time (gut feeling is always good)
If there is time and money see how to use an performance testing tool to measure the app (enterprise software)
3. Check the log files of the app while testing
Often there are exceptions
Check that the request and response is encrypted
Lock for debug information that should not be in the release candidate of your app
Thats it so far for the mobile specific testing
Lets come to mobile tools.
When I talk to other mobile testers, this is always a problem. The tools and to find the right mobile test automation tool.
The tools based in the next couple of slide are open source tools
Before I start with some tools, I want briefly talk about the test automation pyramid
You see the traditional test automation pyramid for software applications
But this pyramid is not applicable for mobile apps
Mobile Testing requires lots of manual testing
Unit Testing for mobile apps is not easy and sufficient
Lots of interfaces or APIs needs to be mocked or is not possible
Integration testing is not easy
UI Tests including E2E testing is important
Mobile tools are not mature enough for unit testing
Most projects look like this from a test pyramid point of view. It‘s flipped
No stable foundation, it can fall to the right or left side
Therefore I created a mobile test pyramid
Due to the current tool situation and the fact that mobile requires lots of manual testing has flipped the testing pyramid
Foundation is manual testing
Followed by End to end automation from the UI to the backend systems
New is Beta Testing. Have the customer expectations in mind. Use beta testing in your project. Either with colleagues or using a crowd testing approach
And still use unit tests but this time very little compared to the rest.
NEW: The pyramid contains manual and automated parts
I use this pyramid in my mobile projects.
Before I come to some tools I wrote down some sentences that maybe helps you finding a mobile test automation tool.
1. First of all, DO TEST AUTOMATION.
It is not easy, but you have to do it, also on mobile
2. Don‘t huge test automation tools, enterprise tools might be good, but most the time there are just expensive and slow. For example, when there is a new update from ios or android it could be that the software is not supporting it
Since 4 years I am working with open source tools and this worked out pretty good!
Open source can be extended, by YOU!
3. Start small and simple. KISS is the magic word here. Discover the tools, see the documentation and so on
4. No tool is perfect neither closed or open source.
Mobile test tools are still at the beginning
5. See which tool fits best in your dev and testing environment! Thats different for every company.
But now, some tools for Android and iOS
List some open source test frameworks for android Robotium Recorder
List is not complete
Most of the tools simulate real user interaction
All frameworks except Robolectric to execute the tests on the real device!
You can combine tools
A good way to find the right tool is to build a dummy app that contains all elements your future app will have, then test the test tool and see if the tool can handle all the elements
A short example from my current project. Android project, want to try espresso (test tool from google). We have a date and timepicker in our app. Espresso has no support for that elements
so we are using robotium together with spoon
A greate source for mobile tools is the dev corner from the company square. And there are many other tools on the market.
Also a list of open source tools
Android offers more open source tools than on the iOS side
All listed tools are automating the user interface
Most of them can execute the test on the real device
Sometime it make sense to combine the tools, like Kiwi or XCTest with Keep It Functional
There are also tools in the cloud that could be used for testautomation, there are plenty of providers
Waiting for Selenium 3, this should offer full mobile test automation features
Another tip that was always pretty helpful in my mobile projects, if the mobile test tool is using the same language than the production app. Then developers and testers can work together on the test environment.
- Lets come to the last topic for today
- Lets have a look at security testing on mobile devices.
1. Check if the communication between your app and the backend is encrypted (use a proxy tool)
Check that the data that is stored is encrypted in the local database
2. Check that the signing certificate is valid, check signing password of the app
Check also the developer account password from the stores!
3. Use only the permissions you really need in the app
Ask the devs twice what they have done!
Security testing is not easy
Get help by experts to avoid image loss, money and whatever
To get started with the topic security testing check the OWASP Mobile security page
Summary, lets just recap the last slides
We have seen pleenty of topics that needs to be covered when a mobile app should be tested
Here are some other facts and point that maybe help you guys in your daily work
Thank you very much for your attention.
If you have questions feel free to ask them
If you are still looking for mobile testing content visit my blog from time to time, I try to keep you updated there!