We all know it – location based apps are the rage these days and according to Pew Research Center “74% of adult smartphone owners ages 18 and older say they use their phone to get directions or other information based on their current location.”. Of course, that means, developers, marketers, apps etc are all targeting to provide value-added services to users based on their locations.
Tools for testing location based apps
So, you have built a mobile app that is location-aware i.e. it uses phone location to fetch, process and present information according to its current location. Now, it’s one thing to make a location aware app, and it’s quite another to see it work in the wild wild west. For example, you are based out of Seattle, but you want to make sure your app will work for a user who is based out of China or Middle-East as well. You want to ensure that when a user from USA, travels to Spain, the app tracks the new location and loads and processes information as it was while the little bugger was in USA.
Of course, you could just say “Hey man, as long as it works around me, myself and I… it’s all good”. But you know – that ain’t good enough! So how the heck do you really test geolocation based apps worldwide?
We put together a few tools and techniques available today to help you test the location-awareness of your mobile app from the comforts of your development environment.
iOS and Android both comes with location-aware testing framework libraries and tools. But they involve a slight learning curve to use them effectively. Then there are third-party frameworks and tools available such as SmartBear that offers complete mobile testing suite – but are pretty expensive to a small team of developers.
Take a quick look at each of these approaches.
Simple to use, and readymade with all the automation tools needed to test you mobile app, this suite costs <ahem, edited> a pretty penny for a single-node license. SmartBear support all major mobile development platforms so you only need to write tests once and SmartBear will run them across all the platforms. It can also integrate with your existing ALM processes and can provide continuous Integration for your development life-cycle. If you are looking to have all the benefits and features of mobile app development lifecycle rolled into a single tool, then SmartBear can be a good candidate to consider.
iOS built-in location testing tools
Starting with iOS 5, Apple added location simulation tools to its Xcode IDE. There are now three ways to test the location-awareness of your iOS apps:
GPX files and schemes loaded via Xcode
Location Simulator to manually set location coordinates within the app
Use the UI Automation Instrument to load advanced location use-cases such as movement and routes. With GPX files, you need to write XML code – as shown below – to input the location coordinates for Xcode to load during an app debugging session. You can specify many such locations to help you test your app, as if you are carrying your iPhone physically to multiple locations.
While the app simulator running, you can specify a custom location to iOS to pass it on to your app to mimic the physical location.
Man, it’s a pain in the “wrong place” though..
However, this approach is not as robust as the GPX files, but is good to do a random location-specific testing, if needed.
UI Automation Instrument
The most powerful method of testing a location-aware iOS app is to use UI Automation Instrument. This method is most complex and involves a steeper learning curve that the other two methods, but once you have mastered it, you can be rest assured that your apps will be able to work across all location-based use cases as designed.
Location testing tools for Android
Alright – so what do we have for Android?
Fake GPS Location
Android developers can use Fake GPS Location (https://play.google.com/store/apps/details?id=com.lexa.fakegps&hl=en) location app to fake their device’s GPS location. Once downloaded, the developers need to run Fake GPS Location to change the location of their device, then load their app they want to test for location-awareness. This will trick the app into picking the new location instead of the real location of the device.
So, what’s it going to be buddy?
If you are always developing complex mobile apps and need an all-in-one suite of tools, then SmartBear can be considered, as its high price may be justified based on your usage scenarios. Otherwise, for small to medium sized development teams building small apps, the built-in iOS simulator tools or Android’s Fake GPS Location app are more appropriate choices.
Comments/questions – ping me!