Can't donate to charity?
Volunteer computer time
or Support SETI!
R&D Sponsorship Center
May 2013

Home Page
Feature Archive
A&I Column Archive
Production Tools
State Marketing Data
US Marketing Data
World Marketing
Service Directory
Quality Assurance
3D Printing

Subscribe to Advertising & Marketing Review!
Contact Ken Custer at 303-277-9840.

Advertising in the Third Dimension

How to Build a Robotic Test Harness for Mobile Devices

by Glen Emerson Morris
Related Columns
Desktop Manufacturing
Hits the Home Market

It's the biggest revolution of the 21st century. And it's going on now.
The Fab Future of
Desktop Manufacturing

Desktop manufacturing is finally getting affordable, at least to businesses.
The Object of 3D Printing
Print anything you need, from cameras to cars, and do your own recycling.
The Future of Arthur C. Clarke
One of the greatest science writers predicts what this century will hold for us.
Recommended Columns
The Greening of Expectations
It's not a fad, it's critical to our survival.
The Learning Curve to Prosperity
Buckminster Fuller predicted the resource crunch now hitting us. He also gave us the tools to deal with it.

Browser/platform compatibility testing has been an issue since the beginning of Internet based advertising. The difficulty level seems to have run in cycles. In the beginning, there were just a few combinations, so supporting all of them was easy and affordable. By 1999 there were a lot of combinations, and things got complicated and expensive. Then for a while, Microsoft IE had a 95% share of the market and testing was easy, especially with .NET servers. Then came mobile devices, and last count, there were over 6,000 different variations of them, all potentially needing testing. Ay, carumba!

Mobile device testing has become one of the most difficult and expensive aspects of mobile advertising. It wasn't planned that way. It just happened. It doesn't take a rocket scientist to calculate things can't keep going on this way. Sure, Selenium Webdriver was designed to make mobile device testing possible, but it wasn't designed to make mobile device testing affordable. I think it's time to consider an alternative to Selenium, and I believe the best alternative is robotic testing.

Understanding why a more economical way to test is so badly needed now requires some understanding of how we got to where we are. The commercial developers of tools like WinRunner and QTP, were slow to respond to the mobile device market, and for want of something better the open source tool Selenium WebDriver became the default test tool. Major Internet sites like Yahoo and Google loved its predecessor Selenium Server, which was genuinely cost effective for a lot of Web testing purposes. But then the mobile device came along, and a new version of Selenium was required. Selenium WebDriver was born, and everyone adopted it because they were already using Selenium for testing desktops and lap tops. No one seems to have done a full cost benefit analysis of what the long term costs were going to be, and that may have been a big mistake.

Selenium WebDriver was specifically designed to run on mobile devices, and it works, but it comes at a price. WebDriver tests generally take a lot longer to write than Selenium Server tests, and that adds up very quickly. I've seen it take 150 lines of code to run the same test Selenium Server could have done with 50 lines of code. As a result, a lot more engineers are required to test the same amount of code.

Manual testing is an alternative, but it has issues, too. The average intelligent phone has a keyboard that is simply not designed to allow for fast data entry. Tablet computers are easier to deal with, but only up to a point. It's possible to add Bluetooth keyboards to iPads and Android tablets for data entry speed and convenience comparable to desktops, but the result is still slower than with automation.

My solution to the mobile device testing problem is to combine manual and automated testing into what amounts to robotic manual testing. Simply put, you build a robotic test harness to enter data and commands on screen with a mechanical stylus much as a human manual tester would do. Then you capture a screen shot with a high definition camera to log test results and otherwise automate testing. It's actually a relatively easy hardware harness to build.

The kind of mechanism needed to move the stylus for data entry is identical to the mechanism used in many open source 3D printers, and these sell for as little as $400. All you have to do is replace the extruder mechanism with a solenoid operated stylus (under $20). Add a few more solenoids to push the buttons on the device and you're ready to go. It may sound radical, but it's been done before. I saw similar mechanisms used to enter test data through a conventional keyboard 20 years ago. The problem was the keyboard mechanism wasn't as fast at entering data as automated software test tools like WinRunner, and it couldn't deal with anything that required use of a mouse. These days, the amount of data needed to test isn't a major factor, and the touch screen has replaced the mouse, this kind of testing is both feasible and economical.

The only other major physical component needed is a high definition camera focused on the mobile device's screen. Every time the test needs to verify something the camera takes a screen shot, processes the screenshot with an optical character recognition application which converts the image to text, and then compares the actual text with the expected text to determine if it passed or failed. The system could also do bit mapped image comparisons, something Selenium can't so, but there's more.

One of the key advantages of the robotic approach is that it hugely reduces the amount of code that has to be written, and it greatly extends the lifetime and utility of the code that is written. For one thing, the same test code will run on nearly any mobile device with any operating system or browser with only minor tweaks. The introduction of a new operating system might require a test to be substantially reprogrammed to run in selenium Webdriver, but the same test might not need any reprogramming at all to run with a robotic test harness.

In addition, any improvements to the test harness efficiency, say in the optical character part, would improve testing across the board. Long term, the tests would be getting easier to run, and possess more and more built in artificial intelligence. In contrast, the conventional Selenium Webdriver approach would constantly require retiring code tied to platforms and browsers no longer supported.

Robotic testing would drastically reduce the time required to execute a comprehensive suite of tests by cutting down on the amount of code that had to be written before testing started. It's difficult to program automated tests until the application has its code frozen, meaning no more changes can be made. Unfortunately, it can take weeks, even months to write the code necessary to perform automated testing with Selenium Webdriver. Robotic testing bypasses that issue, nearly completely.

The payoff would be enormous. The development of cost effective robotic testing would free engineers to focus on adding new features, instead of just testing them. At the same time, the number of different mobile devices supported by an advertiser could be greatly increased, safely and economically. No other automation approach can credibly make these claims. Stay tuned. Now that I've finished building the automated lighting system test harness, my next project will be a robotic mobile device test harness.

Glen Emerson Morris was a senior QA Consultant for SAP working on a new product to help automate compliance with the Sarbanes-Oxley law, an attempt to make large corporations at least somewhat accountable to stockholders and the law.
He has worked as a technology consultant for Yahoo!, Ariba, WebMD, Inktomi, Adobe, Apple and Radius.

Copyright 1994 - 2013 by Glen Emerson Morris All Rights Reserved ' keywords: Internet advertising, Internet marketing, business, advertising, Internet, marketing. For more advertising and marketing help, news, resources and information visit our Home Page.

Back to top

Economic Indicators
Census 2010
Census Bureau
Health   Labor
Commerce Dept.

It's Time to Let
A Robot
Make Your Sales Pitch!
Roy the Robot
Funded by Kickstarter