Continuous Integration

If you can’t wait to download my slides from the Adopting ALM event, it’s right here:

The other thing I demo’ed at my session was how to set up an interactive TFS Build agent. There’s a good reason why you would want to run an interactive TFS Build Agent. This is the scenario. You have associated a test list that includes a UI functional test case to your build definition, you want TFS Build to bring out the application window so that your tester could perform UI functional testing, and then decide whether the test passed or failed. 

It’s pretty simple. Go to the following folder (the installation folder of Visual Studio 2008).

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies

Edit tfsbuildservice.exe.config file. Locate the following element:

<add key="InteractivePort" value="9192" />

Open a Visual Studio 2008 Command Prompt and make sure you run it as administrator if you are using Windows Vista or Windows Server 2008.

Reserve the port using the wcfhttpconfig utility. The commands you could use below:

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies>wcfhttpconfig
wcfhttpconfig.exe <command> <options>
Commands:
  reserve <user> <port>          Used to reserve a port for a particular user
  free <port>                    Used to remove a port reservation

Examples:
  wcfhttpconfig.exe reserve DOMAIN\User 9191
  wcfhttpconfig.exe free 9191

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies>wcfhttpconfig reserve tfsrtm08\darren 9192

Then run the TFSBuildService like below. Essentially you are running another instance of TFSBuildService that listens at the port 9192.

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies>TFSBuildService.exe
Press the Escape key (Esc) to exit...

When you queue your build, just select the interactive build agent. The properties of an interactive build agent:

image