Alex headshot

AlBlue’s Blog

Macs, Modularity and More

Testing mobile handsets with FitNesse

2006, test

Uffe Kock (from Motorola) discussed how FitNesse can be used for testing mobile handsets. Obviously, the combinations of mobile handsets, operators, and airlink technologies mean that there are many different combinations of things (and more importantly, many different ways that they can go wrong). A manual process for testing out all these combinations is unlikely to be cost effective; each time a cyccle is required, many man-hours are likely to be taken up (not to mention documentation being out of date).

The solution to both of these problems is to automate the tests with FitNesse. This allows the documentation and test cases to be combined, so that they will always be up to date and used to drive the system. Having a 'virtual' device (where a phone is emulated on the software) means that tests can be automated to ensure that they are doing the right thing. An XML format can be used to describe the state of the system, with test and buttons available on the screen. Functional tests can then assert that the XML contains specific features (e.g. that there is an appropriate label on the screen, or that the menu option is selectable). Furthermore, you can then derive the documentation from the FitNesse documentation on the wiki.

This can also be used to test real phones, by injecting the virtual keypresses into the system. It makes for a simple, but effective, system. Testing the contents of screens (particularly if they involve graphics) is a little more complicated but not an insurmountable problem; for example, the screen bitmap can be used to compare against a known good value).

This can also be used to record regression tests; if a bug is found on a phone, then the test case can be recorded in FitNesse, and then after the bug is fixed, it can be run with the remainder of the tests. Of course, the tests will be specific to a particular phone structure, but if a family of phones all have the same basic menu structure then they will be able to use the same tests in order to drive them.

There's a number of outstanding features; the speed of tests (or indeed, checking that an operation occurs within a particular time-frame); how tests can be recorded by manual operation of a device, and in the case of migrating from a previous system, the migration of existing documentation/tests into the FitNesse format. The video is now available.