More information about mobile testing
This is the second part in a series on mobile testing.
In the first part, you’ll find tips for testing mobile apps.
In the third part, Heusser covers Android app testing.
This tutorial is for an iOS6 or higher, tied to a Macintosh running the same major release of Safari. In Safari, go to Preferences>Advanced and, at the bottom, click on "Show Develop Menu in Menu Bar." Now, on the phone, go to Settings>Safari>Advanced>Web Inspector. Turn Web Inspector on. Connect the phone or tablet to the laptop with your USB cable, and use the phone to go to a website. On the Macintosh, load Safari, then use the Develop menu to select the phone.
This will pop up the debug window. In the example below, I've selected network traffic and refreshed the page on the phone; the developer tools show me which resources are loaded and when:
Try it on a laptop running the same version of Safari
If you're using a Macbook Pro to debug the mobile device, you can likely reproduce that bug in Safari on the Macbook. That means your developers can as well, in a place where they'll have more control of the environment. You can also record screencasts (movies) of the bug in action. My preference is to do this with Snagit, a great little tool that you can use for free for 30 days.
If you press both buttons on an iPhone at the same time, the device will take a picture of the screen. You'll hear a satisfying click.
For iOS devices, these movies tend to be very large, around 800KBps, which may be too large to be uploaded to your bug tracking system. If you go to Camera Roll and use the email-movie function in iOS, the device will compress the movie with a different codec that takes up much less space.
Teams that test on the same internal network as their developers will have a much different experience from what someone at home, on a cell network or with limited coverage will have. To simulate that, you'll want to experiment with changing the bandwidth, packet loss and possibly even propagation delay.
The easiest way to limit your bandwidth on iOS is by using Xcode for the Macintosh, a free Apple developer tool. You may need to register for Apple's developer program. It's free. Now, launch Xcode, plug in the phone with a USB, and select Window->Organize->Your Phone. You should see an option to enable developer tools: Click it and the tools will install. Once that's done, you'll see an option on your phone for Settings>Developer that includes a network link conditioner. The network link conditioner allows you to simulate different kinds of connections or build your own based on uplink or downlink speed, latency, and packet loss.
As an added bonus, Xcode installs network link conditioner on your laptop as well. You can find Xcode in your Settings menu.
Fake out your location
You may want to test a Global Positioning System (GPS)-aware application from various places without having to pay for plane tickets. The simple way to fake location is to get an iOS application that does just that: It overrides the built-in GPS and provides a fake location that you suggest. Fake Location and Location Spoofer are two applications you can purchase in the iTunes store that override the operating systems GPS, causing it to report your chosen location, for a lot less time and money than a trip to Las Vegas.
Dig Deeper on Mobile Application Testing Techniques and Tools
Matt Heusser asks:
Do you use Xcode for iOS bandwidth testing?
1 ResponseJoin the Discussion