Sn_jh
Sn_jh

Reputation: 21

Test Execution fails when VM is not connected through RDP

I am trying to run the Test Compelete Scripts on a virtual machine through Azure DevOps pipeline.

VM is configured as agent and run as an interactive process, auto logon feature is enabled.
Now, I wont connect to VM that is VM is in locked state.

When I run the Azure Devops pipeline release. Execution starts in VM. But when I check the logs I see that the user action in the Test scripts are not performed. Eg: My application is launched, and next steps when I have to select a radio button execution fails and also in TE log I can see "User session is disconnected and also I can see that it is not able to identify the object)

Upvotes: 2

Views: 357

Answers (1)

Hugh Lin
Hugh Lin

Reputation: 19471

You typically get this error when the test is run from a scheduled task with the Run whether user is logged on or not option. The error occurs because in this case the test is run in a non-interactive session and cannot interact with the GUI.

To resolve the problem, do the following:

  1. Modify properties of the scheduled task to use the Run only when the user is logged on option and specify the user account under which the task will be run.
  2. Make sure that the specified user is logged into the system when the task is triggered.

Here is the document you can refer to.

Upvotes: 1

Related Questions