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

3 comments

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

--
Pavel Sher

0

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

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

Please sign in to leave a comment.