Forum Discussion

nastester's avatar
nastester
Regular Contributor
5 months ago

TestExecute: Setting up interactive/auto-logon agent for pipeline testing

I am trying to get tests to run in an Azure pipeline and am running into an issue when running from the pipeline, the agent isn't starting.

If I manually log into the build machine, the agent auto starts and everything works fine.

 

But I need it to do this automatically via the pipeline tasks.

 

I see this in the docs and this is currently set up but it won't start automatically:

If you use Team Foundation Server 2018 or later, you can run the agent with the auto-logon enabled. In this case, when the machine where the agent is installed starts, the agent launches and opens an interactive user session on the machine automatically. You enable the auto-logon and specify the user account that will be used to open user sessions when you configure your agent. For detailed information on how to configure agents, see docs.microsoft.com/en-us/azure/devops/pipelines/agents/.

 

Has anyone encountered this? What can I do? 

5 Replies

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    If you are not able to have Windows auto login enabled, then you need to have a dedicated user log into the machine, then use tscon utility to disconnect from the remote machine. The session will remain active, and the agent can then use this active session to run the automation.

    • nastester's avatar
      nastester
      Regular Contributor

      rraghvani 

      So this applies when trying to run tests from a pipeline? 
      I guess I am failing to see how to configure this.  The agent is set up. And if I manually connect while the pipeline is running, the agent auto-starts on connection and the tests start to run. 

      I am just trying to figure out how to get the pipeline to do this automatically without the manual intervention of connecting to the build machine.

      Note: I am running TestExecute and running headless.

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    It applies to running automation unattended.

     

    Your build machine, should be a dedicated machine that should only build (and possible deploy).

     

    You should have a dedicated machine, where you can run your automation. This machine should have a dedicated user, that is setup to automatically log into the machine or is always logged in. The machine should not be locked. It should have TestExecute installed and whatever agent (Jenkins, Azure DevOps etc) installed that can run TestExecute.

     

    You can then kick off a build, which will then hopefully perform a deploy to your automation machine, and then the agent will run TestExecute with the appropriate parameters.

     

    This is a standard setup of continuous integration/continuous delivery. However, I perform deployments manually, and run automation on a weekly basis via task schedule.

    • nastester's avatar
      nastester
      Regular Contributor

      Thanks for the response.

       

      I guess this is the part I need more info on:

      This machine should have a dedicated user, that is setup to automatically log into the machine

       

      Having a user always logged in is not an option for us.