My project at work has finally advanced to the stage that I am writing automated UI tests for Asp.Net MVC 2 using the WatiN UI testing framework. I wanted to be able to run these tests as part of my automated build process using Team Build (TFS) 2010. It turned out to be easier then I thought for once.
- Verify the account your Team Build service is running as. Mine is domain\tfsbuild
- Run dcomcnfg to grant COM activation permissions for domain\tfsbuild
- Expand Component Services, Computers and right lick on My Computer choosing properties
- Click on the COM security tab
- Under Launch and Activate Permissions, click edit default
- Add domain\tfsbuild and give allow permissions for local launch and local activation
- Expand Component Services, Computers and right lick on My Computer choosing properties
- Log onto the build server as domain\tfsbuild
- Fire up IE and browse to the websites you will be testing against. Verify that you can get to the websites, and there are no IE windows or warnings getting in your way. Common ones include IE enhanced security warning, and certification errors.
- I have my servers SSL certs signed by a private cert that is trusted by all computers on the domain
- I added our internal domain name (i.e. domain.local) to the intranet sites zone in IE. This got rid of the IE enhanced security popup.
- I have my servers SSL certs signed by a private cert that is trusted by all computers on the domain
- I did NOT have to change the TFS Build configure to run the build agent as a interactive process. It is still configured to run as a service.
I should add that this is for TFS 2010 RC. I’ll be upgrading to the RTM this weekend, and I hope everything still works afterwards!
UPDATED 12/29/2010:
When I first wrote this, I had no Watin tests which used the dialog watcher. Since then, I have added tests which do use the dialog watcher class, and those tests were failing my automated builds. Once you start using the dialog watcher functionality, you must configure the build service to run in interactive mode. Currently I am just logging in to the build machine, opening up the Team Foundation Server Administration Console and then starting up the build process from there (in interactive mode).
I found a resource on how to get the interactive mode to start automatically on reboot, but have not implemented this yet, but hope to in the future.