1

Background - I am running coded-ui test cases using azure-devops build and release definition. and I am running the test cases in Window 10 self hosted VM agent.

While running coded-ui test cases from VSTS, the release deployment doesn't start until I press enter in Agent.Listener.exe window. As you can see in the screen below that there is no job running on it and as soon as I hit enter it it starts to run the job.

Also if I don't hit enter for quite long time the release fails saying, "The agent: "machine name" lost communication with the server. Verify the machine is running and has a healthy network connection.".

enter image description here

and when I press enter it starts the job run by saying running job. Agent.Listener.exe starts with auto-logon during startup in administrator mode.

Can anyone please help me resolve the issue so that I don't have to press enter every time I trigger a new test case?

Pankaj Devrani
  • 510
  • 1
  • 10
  • 28
  • What options did you use for configuring the agent? You have it configured as auto-logon and not a service? Have you checked out this [link](https://learn.microsoft.com/en-us/azure/devops/pipelines/test/ui-testing-considerations?view=azure-devops&tabs=mstest#visible-ui-testing-using-self-hosted-windows-agents) already? Connecting/disconnecting from the remote machine can mess up the UI tests. You might try triggering a restart of the machine and then try executing the tests without remoting to it. – Matt Feb 21 '19 at 15:15
  • @Matt I have configured the agent with auto-logon and running it in interactive mode. I have checked the link given by you as well. I don't use build agent task as I have already installed the agent in my VM. And UI test are running on the agent machine. Its just that i have to press enter to start the job. That is my problem. – Pankaj Devrani Mar 01 '19 at 10:02

1 Answers1

1

You should run the agent with --unattended switch. In order to get more information about this command, run Agent.Listener.exe configure --help. In particular, it contains a number of examples of how to pass the necessary answers to keep it unattended:

enter image description here

Yan Sklyarenko
  • 31,557
  • 24
  • 104
  • 139
  • I don't think the `--unattended` switch does anything beyond the agent configuration. – Matt Feb 21 '19 at 15:16