Forum Discussion

dhundley's avatar
dhundley
Regular Contributor
3 years ago

remote computer/VM "mode" after restart

On the SmartBear support website: https://support.smartbear.com/testcomplete/docs/testing-with/running/via-rdp/keeping-computer-unlocked.html it explains:

 

When using Remote Desktop to connect to a remote computer, closing Remote Desktop locks out the computer and displays the login screen. In the locked mode, the computer does not have GUI, so any currently running or scheduled GUI tests will fail. To avoid problems with GUI tests, use the tscon utility to disconnect from Remote Desktop. tscon returns the control to the original local session on the remote computer, bypassing the logon screen. All programs on the remote computer continue running normally, including GUI tests.

 

My question is this, in what "mode" is the remote computer/VM following a restart/bootup? Will scheduled GUI tests fail unless that tscon utility is implemented?

 

4 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    I would check with your IT group, but for me the restart would kill everything and I would have to start over. 

    • dhundley's avatar
      dhundley
      Regular Contributor

      Marsha,

       

      I inadvertently clicked on the Accept as Solution button. I was simply going to reply by saying that I wasn't talking about the restart happening in the middle of a running test. Clearly, if that happened I'd have to restart the test. I was just inquiring about what "state" (locked or unlocked) is the VM in immediately following a restart? if (as the smartbear website stated) i need to disconnect from any RDP session using the tscon utility so that it's not locked when a test starts running then what state is it in immediately following a restart? if it's locked following a restart then should i either RDP in so that i can run the tscon utility or even create a scheduled task that is triggered on startup to run tscon? the website gives me the impression that its pretty important that the VM is not in a locked state (which it would be if i simply disconnected from the RDP session - i.e. clicked the X in the upper left corner). I guess in a way I'm also asking what is the difference between running the tscon and just signing completely out of the RDP session (so that my credentials no longer have a session with it at all).  do you understand what i'm getting at now?

      • Marsha_R's avatar
        Marsha_R
        Champion Level 3

        I do understand what you are asking and I am still going to advise you to talk to your IT group or whoever manages your VMs. We all have different systems with different configurations and I am unable to tell you what state your VM is in after a restart.

  • Kitt's avatar
    Kitt
    Regular Contributor

    This may help if you are running your tests via pipeline. We set up a agent listener on our VM as described below, then added a task to the pipeline that runs powershell to reboot the VM once the tests have finished ('shutdown /r /t 60'). 

     

    • An interactive user session must be opened on your test agent. You can open the session manually, or, if you use Team Foundation Server 2018 or later, you can configure your agent to run with the auto-logon enabled to open the session automatically when it starts. You enable the auto-logon when you configure your agent. To learn about configuring agents, see docs.microsoft.com/en-us/azure/devops/pipelines/agents/.

     

    Also agree with the previous answer that it could depend on how your VM's are configured/managed - ie: power & sleep settings on the VM (should be set to Never).