How to automatically end remote session without stopping UI Testing
I read the article "Disconnecting From Remote Desktop While Running Automated Tests" on this site. Unfortunately this article didn´t address the issue of how to automatically close a remote session without affecting the Automated Tests. We do have a signout.bat script that calls tscon.exe, but this requires someone has to run it with administrative rights. That works fine, but the problem we´re having is that often someone forgets to log out and then the test fail if he shuts down his computer or logs out without using the signout.bat file. We therefore want to automatically close the session after a period of inactivity. How can this be achieved?
I'm not quite sure if this answers the question. Our tests are running automatically triggered via the azure cloud. We don't start them ourselves. Howerver we often need to remote into there to pick up the reports, etc. Normally we would click on a signout batch file that closes the session correctly. However, it unfortunately also happens that at the end of the day someone forgets to close the session and then the nightly tests all fail because the session has never been closed correctly. Therefore we want to ensure, that after five minutes of inactivity the session is automatically closed. Normally this an be done using a group policy where a time period can be specified and then the session is either disconnected or closed completely. However, none of these work for us buecause they cause the tests to fail or close the cmd window that waits for instructions. What we need is something similiar but does use the signout.bat file instead after five minutes of inactivity.