embedded world 2017: Functional test automation with Squish

Safety standards like IEC 61508, ISO 26262, and others require verification of the functional behavior with regards to the safety concept of the embedded system. The ever-growing rise of graphical user interfaces (GUIs) leads to new challenges in the testing process. Long gone are the days when HMIs were restricted to a few hardware buttons and LEDs. These days, customers expect the same convenience and eye candy as they know from consumer devices: touch screens and high resolution graphics including animations. Interactive HMIs with multi-touch user input and animations mean a high degree of freedom for the user and a big number of possible states of the user interface. All this needs to be considered in the verification process.

No machine has yet beaten the creativity of a human when performing exploratory testing. But the vast number and complexity of possible user input sequences exceeds what human testers can possible cover in an acceptable time. In particular, product development went the agile path and expects test results to be available "immediately" by usage of a Continuous Integration (CI) system like Jenkins. Naturally, the wish for quicker and repeatable execution of test sequences through automation arises. In the past, industry has resorted to grabbing the raw framebuffer content. But what if the user interfaces is dynamic and undergoes layout or even structural changes? The maintenance of inflexible tests can easily become burdensome, up to a point where the automation effort requires more resources and money than it saves. Squish GUI Tester by froglogic enables creation of robust tests through an abstraction layer that models each element of the graphical user interface in a platform-independent way. Instead of resorting to fixed positions for emulation of user input, the controls are identified through versatile multi-property names. As a result, a push button will still be located properly even if it has moved to another position or assumed a different visual style. And instead of relying on pixel-perfect screen captures, object properties can be queried for verification of output values and visual states. Test development can make use of the scripting languages JavaScript, Python, Perl, Tcl or Ruby. Alternatively, tests can be defined using Gherkin – a human readable format for Behavior-Driven Development (BDD). Test script recording, interactive creation of verification points, a debugger including a variable watcher and test result viewing is provided through the Eclipse-based Squish IDE. Unattended runs are made possible through a set of command line tool and add-ins for frameworks like Jenkins, Bamboo, JIRA, Microsoft Test Manager and others. While support for the cross-platform Qt toolkit is froglogic's stronghold, other UI toolkits like Java, Web, WPF, WindowsForms, iOS, are supported as well. Visit froglogic for live demonstrations of HMI test automation on a series of embedded devices at the Qt booth with number 4-258 in hall 4.

Topics covered in this article