QA Systems Test Dashboard is an Actual Dashboard!

by

Here at QA Systems, to ensure the quality of our software across our many supported operating systems, compiler versions, and Eclipse platforms, we maintain a very large testing matrix. Running this extensive matrix on each developer’s branch would require significant compute resources, slow down the development cycle, and wouldn’t be environmentally responsible. Instead, our continuous integration suite runs a more targeted set of tests against each branch while executing the full matrix on a slower cadence. However, tests within the wider matrix occasionally fail and require updating. When we have multiple branches adding innovative new features, such as Cantata Hybrid for GoogleTest, it can lead to a large number of these tests needing updates.

We needed a way to be notified of test suite failures and track our progress when fixing large numbers of tests. While our web dashboard exists, it’s often hidden behind hundreds of other important tabs, and email alerts tend to get ‘filed away’ and forgotten. The obvious solution would be to display the dashboard on a screen or projector in the office, but with each developer already having two or more monitors on their desk, the development suite didn’t need any additional screens! Our requirements were simple – we wanted a method to physically display test failures that wouldn’t be distracting and wouldn’t require another screen. Unfortunately, this ruled out old railway station-style flip-dot displays and bright, colorful LED matrices, however appealing they might be.

We settled on the perfect solution for our testing dashboard – a replica car dashboard! Perhaps a little inspired by vintage Porsche dashboards, it is made up of three low-cost motorcycle tachometers on a 3D-printed base. It was important to find dials that went up to 10 and were easy to drive via a microcontroller. These low-cost tachometers from a well-known dropshipping marketplace fit the bill while maintaining the desired aesthetic. Ideally, we would have used dials with a logarithmic scale to distinguish between 0 and 1 failure while also being able to show tens of failures. However, none were available that met our requirements. Instead, when the number of failures exceeds 10, the result is shown divided by 10.

The no-screen rule was bent only slightly by incorporating a tiny OLED display below the dials in the dash. This is a SparkFun MicroView, which combines an OLED display with an Arduino microcontroller that drives the dials. The display shows both the branch name against which the test suites were run and the last work package merged into that branch. This addition makes looking up the actual results faster while maintaining the car dashboard aesthetic.

To implement the dashboard, a simple script on a developer’s workstation pulls test results from our CI web dashboard’s API and sends the data to the microcontroller over USB serial. The dials require 12V power, so a small boost converter supplies this from the 5V USB power. Moving the dials requires sending a PWM signal matching a single-cylinder engine’s spark plug frequency at the desired RPM. For example, to display 1, we use 1000 RPM, which equates to 16.66Hz. Since this frequency is too low for the microcontroller’s hardware PWM, a “Slow PWM” timer interrupt-based approach was implemented. The 5V I/O levels from the microcontroller are sufficient for the dials to detect.

The dashboard took less than a day to design and implement, contains fewer than 100 lines of code between the script and Arduino, and has already proven invaluable! We encountered only two minor issues during development. First, unexpectedly, the wire requiring +12V on the dial was black, which initially made the dials appear broken (for reference, our dials use the following wiring: red for LED +12V, black/white for LED GND, black for +12V, green for GND, and orange for signal). Second, when displaying high numbers (e.g., 9 or 10), the dials can each draw several hundred milliamps from the 5V source, while USB serial converters typically have a 500mA polyfuse. This issue is easily resolved by providing a dedicated 5V supply to the boost converter instead of relying on the USB serial converter.

If you want to build your own dashboard, the 3D printable files are available for free. The code and wiring implementation is left as an exercise for the reader!

RELATED RESOURCES

Related Posts

None found