Overcoming Mobile App Testing Challenges To Find Regression Bugs

 7348035690_73473f4edc_zAnyone coming to mobile development after having worked mostly or exclusively on Web projects knows that there can be many stumbling blocks at the outset. The emergence of Swift – marketed as “Objective-C without the C” to highlight its resemblance to modern languages such as JavaScript –  for creating iOS apps may eventually help ease this transition. For now, though, there are still major shifts to make whenever pivoting to smartphones and tablets.

App Development And Testing Challenges

One of the overarching challenges of testing mobile apps, whether working with Objective-C on iOS, Java on Android or JavaScript with PhoneGap, is covering all bases when it comes to devices, just as you would for malware security. This can be particularly difficult with Android and its highly fragmented ecosystem. Test cases have to be run for a wide variety of hardware, some of which may lack basic features such a gyroscope, as the game developers Game Oven recently discovered when porting Bouden to Android.

Speaking to TechTarget, Erdal Tuleu, director of engineering at imo, outlined how mobile app development has created new testing challenges such as ensuring that messages are delivered to multiple clients and endpoints. He stated that imo team members routinely run around with a “whole bag of devices” to vet each one’s peculiarities.

“In the past it wasn’t too common to have more than one station,” Tuleu told TechTarget. “People usually logged into their laptop or desktop and closed it before going home and logging in again there. Now it’s fairly common for people to have more than one station. For example, you can have it open on your laptop and again on your phone.”

It’s not just devices or marketing automation processes that are challenging. In a post for DeveloperEconomics, Jim Cowart lamented that developers often are unaware of what tools are available for helping them overcome common obstacles.

Types Of App Testing

It can be easy to forget that there are numerous types of mobile app testing. There are three types of application testing based on the three types of apps – native apps, mobile web apps and hybrid apps. Native applications are created to be used on mobile devices and tablets. Mobile web apps are server side applications that allow you to access a website on mobile via various browsers by connecting to a mobile network or wireless network. These browsers could be Chrome, Firefox, Safari or others. Hybrid apps are a combination of the two. Hybrid applications run both offline and on mobile devices. They are written using programming languages like HTML5 or CSS. These tree types of applications utilize different types of mobile testing so this is important to remember.

Unit Testing

Take unit testing in iOS, Android and PhoneGap/Apache Cordova, which typically targets a small slice of code and assesses its behavior. Since unit tests are automated, they are a highly efficient way to look for problems such as regression bugs. Here’s how unit testing can be handled with iOS, Android and Phone Gap.

IOS

Writing for the M-Way Solutions blog, Marcus Kohler pointed out that unit testing tools are freely available and built-in to XCode. He provided the following code example of a simple unit test that would check whether a given topic existed:

(void)testThatTopicCanBeNamed {
Topic *namedTopic = [[Topic alloc] initWithName:
@”iPhone”];STAssertEqualObjects(namedTopic.name,
@”iPhone”,
}
@”the Topic should have the name I gave it”);

Overall, doing unit testing for iOS is inexpensive and requires minimal setup. Plus, the large selection of bundled tools means that teams usually have what they need to follow test-driven development approaches.

Android

Google recommends the JUnit framework for doing unit tests on Android. Various extensions can simulate Android elements.

Alternatively, there’s Roboelectric. It runs unit tests directly in the Java Virtual Machine. Tests can be done from the IDE and as part of continuous integration processes.

PhoneGap

There are numerous options for unit testing JavaScript, including:

  • QUnit
  • Mocha
  • Jasmine
  • except.js

Unit testers may also try out code using the PhantomJS WebKit browser. Like Roboelectric for Android, PhantomJS is easy to weave into a continuous integration workflow for automatic testing of the codebase for any of your app invention ideas.

Sources:

http://blog.mwaysolutions.com/2014/01/23/software-and-unit-testing-for-ios/

http://www.developereconomics.com/nick-2/

http://searchsoftwarequality.techtarget.com/feature/Testing-mobile-applications-is-different-than-testing-Web-applications

http://gameovenstudios.com/bounden-on-android-delayed/


One comment

  1. You just need to add a few more details on this one.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll To Top