There’s a good reason why testing Windows desktop apps was one of the most requested features from customers: no one in the world has the infrastructure to parallelize thousands of runs per month.

Web testing infrastructure is relatively easy: a headless browser starts inside a Linux container in a couple seconds, costs a fraction of a cent to run, and gets thrown away when the test ends. There’s no equivalent for testing a Windows desktop app.

Our answer was to stop treating Windows machines as servers and treat them like phones: a device that one test claims, uses once, and throws away.

The basic architecture borrows from our mobile testing infrastructure, because mobile testing has the same constraints: the test code can't run on the device it's testing, and each test needs a device to itself while it runs. Since a Windows machine is modeled as a device in Kubernetes, a test can ask our custom device scheduler for a VM with a DeviceClaim, get its connection details back, control the device remotely through WebdriverIO and Appium, and release the machine when the test is done.