Squish for automation of HMI tests on embedded devices

Embedded HMIs have seen tremendous growth in their application within the automotive technology sector, a market valued in 2015 at roughly $16 billion (£12.3). In-vehicle infotainment (IVI) systems and human-machine interfaces (HMIs) are technologies in almost all modern consumer cars, providing capabilities for navigation, multi-media playback and safety-critical systems.

With the rise of modern user interfaces in the embedded industries, new methods to automate GUI tests of embedded devices are required to develop and ship quality products.

Historically, in-vehicle infotainment systems originated as in-vehicle entertainment systems providing audio to the vehicle via radio, cassette players or CD players. Once controlled by knobs on the console or dashboard of the vehicle, today’s IVI systems are operated through complex graphical user interfaces (GUIs) supported by software that is sophisticated and complex, yet aimed at being user-friendly and safe to use.

Automotive consumers of today expect their IVIs to be intuitive and user-friendly, despite the underlying complexities of the HMI. They must be highly responsive to touch-based and gesture- based user-software interactions, and offer a complete and coherent visualisation of the underlying vehicle applications for which the IVI controls and displays.

Lastly, with the advancement of connected cars comes the rise of companion apps, or mobile applications which augment driving and can control functions for these cars, and which need to be tested on a user interface level.

These constraints underscore the need for automated, robust and reliable GUI tests that can effectively and broadly test these embedded devices.

Cue the Squish GUI Tester, a tool for the creation, execution and maintenance of cross-platform GUI tests running on all desktop, mobile, web and embedded platforms.

Squish, with its support of all major GUI technologies, powerful IDE offering, and seamless integration into the latest Continuous Integration platforms, is the tool of choice for thousands of companies worldwide, many of which are in the automotive technology sector.

Squish stands out among the competition for its breadth of GUI technology support, offering editions for both desktop toolkits and embedded toolkits. The Squish for Qt edition allows for GUI test automation on embedded targets with its dedicated support for automated testing of all Qt widgets, QML and Qt Quick controls as well as embedded Qt Webkit and Qt WebEngine content.

So, how can Squish help?

To enable the automation of HMI tests on embedded devices, a dedicated Squish for Qt Embedded SDK & Support package is available. With this package, the minimal necessary components of Squish can be deployed on any embedded system, such as embedded Linux, QNX, WinCE or Android devices.

After this, Squish tools can remotely connect to the embedded components for automation. Due to Squish’s real cross-platform support, tests can be automated against desktop builds of Qt HMIs or in emulated/simulated environments.

These tests can then be run against the embedded target without any changes. For cases where end-stage hardware is not available, and testing must be done in a purely emulated environment, Squish integrates well with Hardware In-The-Loop (HIL) systems which can simulate physical ongoings of the environment in which the embedded device operates, for example, driving.

Squish also provides bindings to the Qt In-Vehicle Infotainment module, which provides C++ classes and QML types for accessing vehicle features, as well as a core API for implementing new IVI features. The bindings allow tests to interact with all vehicle features provided by the module.

Functional Mock-up Interface (FMI) is a tool-independent industry standard for model-based development of systems, in which a real product is assembled digitally through model exchange and co-simulation.

Testing using simulated devices offers key advantages, including removing the need for a physical device; a simulation can mock rare conditions (i.e., device malfunction); and simulation can provide the test environment with its current state.

Squish can test applications that communicate with a simulated device without any knowledge of the simulation. Squish provides support to import and interact with Functional Mock-up Units (FMUs), allowing Squish to interact with simulators, models and other backend components as part of the system test automation.

In such a scenario, the Squish inputs are processed by the application under test, and appropriate commands are sent to the device. In reaction to that, the device changes its state and notifies the application under test.

Squish can detect changes in the application’s GUI, and confirm a valid response. One such simulator with which Squish integrates is Vector CANoe, a tool which supports the design and development of networks and networked ECUs for simulation, analysis and testing of network communication.

A practical example would be simulation of braking or acceleration in a passenger vehicle, during which Squish tests that the IVI updates accordingly.

What about end-to-end testing?

Squish makes it possible to test multiple applications from multiple devices using a single test script. This makes it possible to test the interaction between different applications or between multiple instances of the same application.

A practical use case for this feature is in testing companion apps that control an IVI, which are applications that pair with passenger vehicles to augment the driving experience. Squish allows a combination of mobile app testing with other Squish editions to automate end-to-end testing of complex scenarios which involve several frontends and applications running on different platforms and devices.

For many companies, however, it is required to reach some sort of safety certification for their embedded devices present in safety-critical systems. This is achieved, generally, by some kind of quality measurement for the testing. A key indicator to measure the quality of testing is to understand how much of the application’s source code is covered by automated GUI tests.

This is the idea behind froglogic’s product Squish Coco, a complete, cross-platform, cross-compiler toolchain for code coverage analysis of C/C++/C# and QML-based applications. With Coco’s automatic source code instrumentation capabilities, the tool can collect and report coverage data against various coverage metrics.

These include function and statement coverage, decision and condition coverage, and even Modified Condition/Decision Coverage. Supplementing analytic coverage data, Coco also maps source code to a color (e.g., red, pink, yellow, green), with the colors identifying untested code, tested code, dead code, or redundantly tested code.

The Qt Company, known globally for its cross-platform SDK technology used in millions of apps and devices, Qt, uses Coco for reaching safety certification in safety-critical systems in which Qt is present. The Qt Safe Renderer, launched in 2018, enables developers to design and add safety critical UI elements to Qt-based safety-critical systems.

In these systems, the concept of functional safety – minimising risk to humans by detecting dangerous conditions and adjusting for or avoiding them – is critical. In automotive cases for which the Qt Safe Renderer is used, for example in the addition of warning indicators in automotive digital cockpits, reaching safety certification would mean achieving ISO-26262 safety standards, an international standard for functional safety of electrical and/or electronic systems in passenger automobiles.

How does Coco come into play?

Achieving ISO-26262 requires quantifying MC/DC coverage, a metric which Coco can determine and report. To complement coverage data supplied by Coco, Squish comes paired with a GUI Coverage Browser, a tool designed to display data on which parts of the GUI (i.e., not the source code) have been hit by tests.

Presented in an easy-to-use interface, this visualisation tool will colour the GUI elements according to if they have been exercised by existing tests.

So, why froglogic?

froglogic’s Squish GUI Tester is the tool of choice for many leading automotive technology companies because it offers unparalleled support for testing HMIs in any context. From device testing in purely emulated environments, to end-to-end testing of companion apps, Squish provides state-of-the-art solutions for GUI testing in all of today’s connected cars.

Introducing Squish Coco to your development and test processes alleviates redundant testing and augments efficient source code coverage, allowing developers to achieve critical safety certifications for products that are designed from the beginning to keep people safe while driving.

Choose froglogic if you are looking for a product portfolio unmatched in its breadth and depth of transforming your solutions into high-quality, safety-certified and user experience-focused top-notch products.

Related Posts