Unit tests are a great way to test isolated units of code, but they can’t give you confidence about a complete application. End-to-end testing aims to test an application in close to real-world circumstances. However, the automated end-to-end testing of desktop applications presents a number of challenges.
We will demonstrate an end-to-end test system that we have developed for testing JUCE desktop applications. The tests are written in Typescript. Each test starts the application, runs a single test, then shuts the application down and logs the results.
We will discuss how we overcame some of the challenges that we faced. For example, how do you control the keyboard and mouse without special privileges? How do you stream audio on a continuous integration node that doesn’t have any audio devices? How do you read the state of the user interface in a reliable way?