If you’re not already developing for mobile, you probably will be soon. And in any case, it’s a good idea to ensure that your software testing and overall delivery strategy will be able to support mobile when it needs to.
Below, I discuss how to go about this. This article is geared in particular toward a software testing team that currently develops a desktop app, but expects to need to extend the app to mobile (while still keeping the desktop build) in the near future. However, the lessons below apply generally as best practices for any organization seeking to keep its testing strategy mobile-friendly.
Coding Effectively for the Transition
Choose the Right Framework
One helpful tip to ease the transition towards adapting your application testing process for mobile is to make sure you choose the right framework from the outset. Let’s imagine you have a software application that currently exists solely as a traditional web application. However, very soon, you will be coding this application to also support mobile devices. The truth is that this application will function very similarly to your initial implementation as a traditional web app. That being said, from a software testing perspective, you will benefit from choosing an automated testing framework that produces test scripts that can be easily adapted for mobile use cases.
One possibility would be to consider Selenium as the automated test framework of choice for your traditional web application. Selenium is a popular framework for automating web browsers. And in the case of preparing to adapt for mobile, Selenium can prove to be a very valuable option for a test engineering team due to the existence of the automated testing framework for mobile known as Appium. Appium was designed, more or less, as a framework that can be described as “Selenium for mobile applications.” It leverages existing Selenium commands, taking them and providing additional functionality to adapt them for mobile-specific use cases. Therefore, a test engineer who can write test scripts in Selenium can write scripts in Appium, thus curbing the learning curve for teams that need to add test scripts to their test set to support the unique test cases that come with supporting mobile.
Develop Independent Tests Through Good Test Data Management Practices
When testing your application at a broad level, such as that thrust upon a team that supports an application in both the traditional web realm and the mobile application realm, test data management can be crucial to ensuring your test set can be executed without running into issues. Any organization running several tests against their application to support mobile and Web will likely be running the same tests many times over and in parallel. By scaling a software testing strategy in this manner, it is common to run into data issues. These can be avoided from the outset by implementing a few practices for managing test data to ensure each test script is independent from other tests and from additional runs of the test script itself:
- Have the test script set up its own data. Don’t rely on the data to be in a certain state upon execution of a test script. As a test executes in parallel on the device/OS or browser combinations it needs to support, it can be difficult to ensure that a test script has everything it needs from a data perspective when the test kicks off. By having the test set up its own data, we can essentially remove the risk of failure due to a data issue at the time of execution.
- Have the test script clean up its own data. As important as it is for a test script to create its own data, it is also important in maintaining a clean test database to have a test script clean up its own data. At the end of the test’s execution, have your test script clean up the test data it created.
Strategies for Testing Efficiently: Supporting Mobile Moving Forward
Leverage the Benefits of Continuous Testing
Continuous testing of all applications will allow any development organization to benefit by ensuring bugs are found early in the development process where they are less expensive (take less time) to fix. This is especially important when the time an organization has is stretched thin due to the effort to support multiple applications, or applications on multiple platforms such as mobile and non-mobile.
Prior to developing mobile applications, begin practicing continuous testing across all of your existing applications. Saving time in one spot means having time to spend in another. And continuous testing practices can help to provide the development and testing teams with that time.
Parallel Testing: Scaling Your Software Testing Strategy
Mobile testing requires support for the multiple combinations of devices and operating systems used throughout the world today. This can be a big difference from testing a regular web application. PCs traditionally have less fragmentation — that is, less operating system and browser combinations to worry about than exist in the mobile realm.
Given the addition of device/OS combinations due to the adaptation for mobile, it is likely good to ensure that your team is set up with a parallel testing strategy to support the scalability issues you are likely to run into during this transition. Parallel testing is an automated software testing strategy where tests run at the same time against various device configurations to cut down on the amount of time it takes to complete all tests in a given test set for all configurations. A parallel strategy may be useful to ensure that testing for all mobile device/OS combinations can be completed in a time-efficient manner.
Many software development organizations either currently develop mobile applications or plan to in the near future. By taking several steps regarding their coding practices for their test scripts and their testing strategies as a whole, a DevOps team can effectively prepare for the expansion into mobile development and software testing on mobile.