New to Telerik Test Studio? Download free 30-day trial

Test Studio UI Testing on Virtual Machines Fails Without Active User Session

Description

I run UI test scripts in a virtual machine using vGPU with Telerik Test Studio. These scripts are triggered by a pipeline, and no user interacts with the virtual machine during execution. However, the tests fail to detect or interact with elements like login fields, despite the application launching successfully. When I establish an RDP connection to the virtual machine, the tests execute correctly.

Cause

UI functional testing requires an active user session to interact with UI elements effectively. When the virtual machine lacks an active session, the tests fail to interact with the application as expected. Establishing an RDP session temporarily resolves the issue because it restores the active console session.

Solution

To ensure UI test execution without requiring a continuous RDP session, use the Test Studio Session Monitor application. This tool maintains an active user session by reconnecting the console session after the RDP connection closes.

Steps to Resolve the Misbehavior

  1. Ensure the Test Studio Session Monitor is installed and enabled on the virtual machine.
  2. Leave the Session Monitor application running on the virtual machine.
  3. Disconnect the RDP session safely, knowing that the console session will be restored by the Session Monitor.
  4. Trigger the test scripts from the pipeline. The tests should execute successfully as the active session is maintained.

If the Session Monitor has been enabled but the issue persists, consider alternative remote desktop software that ensures the virtual machine maintains an active session during pipeline-triggered executions.

See Also

In this article