In the company I am working I was given the Task to design a system to automatically test Windows Applications.
My approach:
- Testproject written in c# and using the WindowsDriver from Appium
- Using SpecFlow to write Feature files (test cases)
- An AzureDevOps Pipeline to run the Tests
- Tests are run on an self hosted agent
- self hosted agent runs in a VM (Windows Server 2019 standard), the VM has admin rights to be able to install the Application it is supposed to test. (Installation via another AzureDevOps Pipeline)
The Problem:
- The WinAppDriver needs an open RDP connection and the VM can not be locked in order for the WinAppDriver to be able to click Buttons.
- an open RDP connection is not a problem, because there are workarounds to disconnect from the VM but keep the connection open.
- cannot be locked is a problem though, because the VM has admin rights it needs to be locked after 15 minutes of inactivity because of security reasons.
My thoughts:
- One possible solution which comes to my mind is to have an agent running on a physical PC which can be left unlocked forever. Then before the Testpipline starts this agent establishes a connection => the test agent is unlocked. But it seems to me that there could be much better solutions.
Any suggestions how to improve the system / make it work without anyone having to connect to the VM manually?