r/windowsdev • u/Particular-Winner136 • Oct 29 '26
How do you scale UI automation for WPF / WinUI 3 apps on Windows?
We build desktop apps on Windows (WPF and WinUI 3, packaged as MSIX) and run end-to-end UI tests that drive the installed apps: launch, click, read windows, compare screenshots. We’re running into the scaling limits of our current setup and I’m hoping someone has solved this better.
Current setup
We have a fleet of small physical Windows machines, each running 3-4 VMs. Every test node is a full Windows instance. It works, but it scales badly: each VM costs a full OS worth of CPU and RAM, and takes a lot of disk. Adding capacity means buying more hardware.
What we’ve tried or researched
CreateDesktop(separate desktop in the same session): looked promising for running isolated UI instances side by side, butSendInputdoesn’t work for us there. It injects into the input desktop, not into our alternate one. UIA patterns work for some actions, but we need real input (drag, tab tear-off, hover, etc.).- Windows Sandbox: only one instance can run at a time, so it doesn’t parallelize.
- Windows Server with multiple sessions: it could technically give us several interactive sessions on one machine. But it’s not the platform our software targets (we want to test on client Windows 10/11 behavior), and the licensing cost adds up.
- Windows containers (Docker): no support for UI interaction, so a non-starter for GUI apps.
What we’re hoping to find
Ideally something like “Docker for Windows, but with a real interactive desktop”: lightweight, quick to spin up, many instances per host, with working input injection, screenshots and UIA.
Questions
- How do you run many parallel GUI test sessions on Windows without one full VM each?
- Is there a reliable way to get working
SendInputinto an isolated desktop/session on client Windows? - Has anyone made multiple concurrent RDP/console sessions on Windows 10/11 work in a way you’d trust in CI?
- Do you get better density from Hyper-V tricks (differencing disks, memory tuning, nested setups) or from cloud options like Windows 365 / Azure VMs?
- Is anyone doing this with WinUI 3 specifically? It seems to need a real compositor/GPU path, which makes lightweight options even harder.
Happy to share what we learn. Thanks!
