Running build agent from console

I have a NAnt target that exectutes my system tests using WatiN. These tests execute from from the NUnit GUI on the build agent machine and locally in both NUnit and VS2005. However, when my build agent tries to execute the systemTests target (even with the appropriate configuration settings) the build just hangs indefinitely. It kicked off at 1AM this morning and ran until 8:30 without finishing a single test until I killed it.

Because our web application uses javascript popups (like alert) and other dialogs that need to be handled, the Build agent needs to have a true GUI session (reference the comments on this blog post: http://danhounshell.com/blogs/dan/archive/2007/03/05/i-really-like-watin.aspx).

Is there any way I can kick off my Build agent from command line and not have it run as a service?

Thanks,
Matt

5 comments
Comment actions Permalink

You can run agent with help of agent.bat, this script is in the agent bin directory.

--
Pavel Sher

0
Comment actions Permalink

Awesome that worked.

For future reference to anyone who attempts to run WatiN tests automatically using TeamCity. You must start your build agent using "\bin\agent.bat start" and NOT as a service. WatiN requires a full UI to execute properly and it doesn't get this environment as a service. I hope this makes it easier for other people!

Thanks,
Matt

0
Comment actions Permalink

How do you run the "agent.bat start" command exactly?

Can you run this as a scheduled task which runs when the machine first boots up, or do you need to have actually Logged in to the machine and which will run it from the "Startup" folder?

Thanks,

0
Comment actions Permalink

I have the same question as Peter did 10 years ago. I would appreciate if someone could answer it.

0
Comment actions Permalink

Hi Vasiliy,

 

we added an answer to our documentation some time ago:

https://www.jetbrains.com/help/teamcity/known-issues.html#Issues+with+automated+GUI+and+browser+testing

and

https://www.jetbrains.com/help/teamcity/setting-up-and-running-additional-build-agents.html#Automatic+Agent+Start+under+Windows.

 

Please keep in mind that this is not a teamcity limitation, it's a windows one, which means that it can differ from one version of windows to another and we can only offer some guidance. This also means that the microsoft help is better suited for help on running UI-enabled processes for your specific version.

0

Please sign in to leave a comment.