TeamCity Console Agent

551 views Asked by At

I have to run one of the TC build agents from a Windows console since that's the only way for it to run Selenium webdriver tests.

However, since this is virtual machine (running Windows 2008 R2) the console gets shut down some time after I disconnected from RDP even though the RDP says the console app will continue to run.

My questions:

  1. Is there any other way to run Selenium webdriver tests with a Windows service agent instead of console?
  2. How can I keep the console agent running after disconnecting from RDP?
1

There are 1 answers

0
Didier Aupest On BEST ANSWER

When leaving your RDP connection, you should execute a custom script inside à bat file:

for /f "skip=1 tokens=3" %%s in ('query user %USERNAME%') do (
  %windir%\System32\tscon.exe %%s /dest:console
)

This will close your connection, leaving the desktop active for user interractions.