This article started out as a Top 5 list but quickly grew as we researched all the tips and techniques we use at RTL for iPhone application testing. Most of these tips came from tracking down memory-related problems, which often resulted in defects that were very difficult to capture.
1. Accurately report available memory. Many of the non-reproducible bugs you run into when testing iPhone apps are related to memory problems. It's critical that you know and report available free memory before launching an application. In all likelihood, the reproducibility of a crashing iPhone app bug is related to low memory conditions. Consequently, a crashing defect may disappear when there's plenty of free memory. In a previous article (Using Memory Sweep for iPhone App Testing) we described a tool that can be used to determine free memory.
2. Provide 'crash reporter' logs with your defect reports. Each time an iPhone application crashes, a .crash file is created on your iPhone. You can retrieve this file when you synch your iPhone with iTunes. Here's a link that describes where those files are stored: iPhone Crash Logs
3. Spy on the app from the console. iPhone apps will report application and system level warnings to the console. You can view these warnings in real-time using Apple's iPhone Configuration Tool. By knowing what's being reported when interacting with an app can help you refine the steps you need to reproduce tricky (and memory related) problems.
Thursday, August 27, 2009
Wednesday, August 19, 2009
Mobile Device Application Testing Coverage Expands

Microsoft luring iPhone developers for Zune apps Developers being offered money to port their apps? If they are successful in luring iPhone developers, you can bet that these apps will need to be tested on both platforms. Are we entering another phase of supporting apps on multiple platforms?
Second webOS-Based Smartphone May Be Delayed Probably news to most that Palm's second webOS device is called the Palm Eos. Was to be available this fall and supposedly smaller than the Palm Pre. Will there be a significant update to webOS when the new devices arrive?
Microsoft Renaming Windows Mobile as Windows Phone Windows Mobile, or WinMo, is expected to change names (WinPho?), probably to reflect Microsoft's new emphasis on its Zune and the mobile device market, particularly the iPhone market.
Dell Confirms Mobile Device Development Based on the rumors, this will expand the Android app market. Looks a lot like the iPhone in this picture.
Samsung's TouchWiz App Development Kit Hobbles Into the Light Samsung's TouchWiz app dev kit is out and it looks like it immediately expands compatibility testing across 3 different smartphone operating systems, Windows Mobile, Symbian and Samsung's own.
Wednesday, August 12, 2009
iPhone App Testing With iSimulate

The iSimulate iPhone app is interesting in so many ways. If you've read the articles posted about it (here's one from my favorite Apple blog, TUAW: iSimulate brings iPhone apps to the big screen), you probably were impressed by the idea of using your iPhone to control an iPhone app while watching it on a separate display. Playing a game on a large display while controlling it through an iPhone, as if the iPhone is some sort of game controller accessory, is intriguing.
And for the many iPhone app developers that are looking for a way to create marketing material of their app in action, iSimulate is probably just what they've been looking for. Recording your iPhone app in real time on a higher resolution display with actual motion inputs and then being able to later edit the recording has got to be better than the various video cam recordings one finds on YouTube.
Labels:
iPhone
Wednesday, August 5, 2009
Using Memory Sweep for iPhone App Testing


The numbers you see for Memory Status will help you diagnose memory problems when testing iPhone app. We used it for memory stress testing. We needed to force a low memory condition to see how an iPhone app behaved. Memory Sweep validated this process. We have a way of setting up iPhones/iPod touches so that memory is forced to be about 3-4MB. Once we do this, we launch Memory Sweep to make sure free memory is as low as we expected (you can see that free memory in the image above is 4.21MB), then quit and launch the iPhone app under test. In this way we can characterize our defects in a precise way so that the developer has confidence in the results.
When you read the reviews on Memory Sweep, you'll find that are very critical about the app. The main complaint is that the app is named Memory Sweep on the iTunes App Store and ends up being called "Scan" on your iPhone. From what I can tell, the critical reviews have been mostly about cosmetics and not functionality. There are plenty of positive reviews, particularly from those that appreciate the capability to force more memory on their iPhones. My main complaint is that this app only runs under iPhone OS 3.0. This will force us to find a similar app to run on older iPhone OS versions for our testing.
Labels:
iPhone
Thursday, July 30, 2009
A Lesson In Defect Characterization - How A Twitter Security Enhancement Created a Twitgoo Problem


Most of the time when you find a bug and the developer claims not to have made any changes, it's always best to quiz the developer with "what-if" questions. That allows you, as a tester, to avoid calling the developer's integrity into question. I usually try questions like this:
- What if during last night's build, an older version of a component was used?
- Even though you didn't make a change for that feature, what if some other change caused this bug?
Subsequent conversations with the developer, including some what-if questions, lead us to believe that no changes were made for this feature and the bug resided outside the developers code. Well since Photo Tweet uploads its photos to Photo Bucket's Twitgoo service, we suspected they had instituted some sort of throttling for uploads. This is reasonable to expect given the popularity of Twitgoo. Maybe they just didn't want rogue apps flooding their service, and apps like Photo Tweet were paying a penalty for the nefarious activities of others. We could not have been more wrong about the root cause of our defect.
We reported our defect to Twitgoo and asked if they had instituted an upload limitation. I was amazed at how fast these folks responded and how helpful they were. Initially they were stumped since this was the first they heard of this problem and HAD NOT put a limit on uploads. At that point, I expected that they could not help any further and we would be left with having to do more debugging. But instead, Michael P. Clark, their SVP of Technology and Partnerships rallied his technical folks to find out what was at the heart of this problem. The next day I got an email from Justin Hart, a Sr. Engineer for Photobucket, informing me that they discovered an unannounced change to Twitter's service. Twitgoo relies on Twitter for those users wanting to "tweet" the photos they upload to Twitgoo. It turns out that Twitter had made a security enhancement. Michael and Justin found this issue very quickly and pointed me to a threaded discussion concerning what Twitter did. Much to Twitter's credit, they quickly made this issue public and extended an apology and an offer for input from developers. Here's a snippet of their statement:
A change shipped last week that limited the number of times a user could access the account/verify_credentials method [1] in a given hour. This change proved hasty and short-sighted as pointed out by the subsequent discussion [2]. We apologize to any developer that was adversely affected. Given the problems, we want to fix this in a public and transparent manner.We learned a lot from this experience. First, the folks at Twitgoo are fantastic and serious about providing a great customer and technology partner experience. Second, some defects are certainly not what they appear to be. Third, when testing products that use APIs that connect to services that connect to other services, it's hard to determine root causes no matter how well intentioned your defect characterization process is. Finally, as you investigate why a defect occurs, don't assume you know the root cause until you have all the facts.
Wednesday, July 29, 2009
Agile Testing Framework For iPhone App Development

My iPhone app has grown to the point where I need some sort of automated testing to keep me from breaking things whenever I make a change. I thought Instruments would do the trick, but I can't seem to make it work. What do you use for automated regression testing?
This is an appropriate question to ask, but one I would suspect results in an answer with a limited set of choices. In fact, the only tool we've come across, and posted an article about, is yet to be delivered (Squish Support For Automated GUI Testing on Apple's iPhone and iPod Touch).
Fortunately, as we all share information in blogs and forums, others points out additional solutions. In particular, one of our readers pointed me to uispec, Behavior Driven Development for the iPhone. I especially liked his comment "It's open source too.". That's always an attention getter for those of us looking for useful tools.
The author of this tool describes it as a "Behavior Driven Development framework for the iPhone that provides a full automated testing solution that drives the actual iPhone UI. It is modeled after the very popular RSpec for Ruby." For those of you interested in learning more this type of Agile development framework, take a look at Behavior Driven Development on Wikipedia.
When you visit the uispec link, you'll find documentation, installation instructions and examples. It looks like a great way to build in BDD testing for those of you that do continuous iPhone app development.
Labels:
automated testing,
iPhone
Thursday, July 23, 2009
Testing For iPhone App Memory Problems

Basically there are 2 types of memory problems to watch out for:
- Primary Memory Leaks (in the "sandbox")
- Secondary Memory Build-Up (out of the "sandbox")
Secondary memory build-up creates situations that, over time, seem to create a permanently smaller amount of memory available for the app to run in, i.e. smaller primary memory. This does not come about because of memory leaks per se, and hence is harder to find with memory checking tools. As opposed to primary memory leaks, crashes or memory error alerts will seem reproducible for this type of memory problem. Consequently, the tester will write up repeatable steps leading up to the crash or memory alert, only to find out that, after restarting their iPhone, these steps will no longer be reproducible.
Our approach to rooting out these types of bugs is to first be able to identify them as categorized above, and then employ exploratory techniques to attempt to find reproducible steps. However, these memory issues can be elusive, and, as stated above, often lead to misleading bug reports. The main thing is to be able to communicate to development what type of memory issue you're seeing so they can use debugging tools to find the problem.
When we find these types of memory problems, our bug reports provide a summary, steps to reproduce, other apps that are running (i.e. Mail or Safari) and a result, e.g. app crashes or memory alert is presented. If the bug is not 100% reproducible, then we comment on where it mostly occurs. Our main effort is to write our bugs up so that a developer is convinced that it's a memory problem of some sort. Once convinced, then they can instrument their code to find it. But if you don't provide a bug report that describes the defect in the context of a memory problem, then the bug will most likely end up as "cannot reproduce" and be ignored.

- Apple iPhone Developer Forum
- Finding Memory Leaks With The LLVM/Clang Static Analyzer
- CLANG Static Analyzer
- Finding iPhone Memory Leaks: A “Leaks” Tool Tutorial
- NSZombie and XCode Oh My!
By understanding memory problems, testers can be authoritative in their defect reports. By knowing where to point developers for help, the test group becomes a resource for helpful investigation and research for tough memory problems.
Labels:
iPhone
Wednesday, July 15, 2009
Gearing Up To Develop and Test Palm webOS Apps

If you are looking to catch up on webOS and the Mojo SDK, then I recommend watching Mitch Allen's (Palm's Software CTO) presentation on webOS development. In the video below, he gives a preview into application development with the Mojo SDK, the development environment and toolset for this new mobile web platform.
Labels:
webOS
Subscribe to:
Posts (Atom)