Instrument and analyze TFS tests

Configure build workflow

Install Holmes on all machines running build agents, and physical/virtual environments running the test agents.

Launch Visual Studio 2010 and connect to your TFS server. Open Source Control and navigate to your build process template (typically DefaultTemplate.xaml). Open the template in the workflow visualizer. Select Toolbox. Then right-click and select Choose items.

In the Choose Toolbox Items box, select the System.Activities Components tab, then select Browse and navigate to Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies folder and choose Microsoft.PathProfiler.TeamBuild.BuildWorkflow.dll. The activity InstrumentForPathCoverage should appear in the toolbox.

Naviagate to your build proces template (typically DefaultTemplate.xaml), double click on the template to launch it in the workflow visualizer. Navigate to part of the workflow that copies binaries to the drop location (typically Process > Run on Agent > Try, Compile, Test, and Associate Changesets and Work Items > Revert Workspace and Copy Files To Drop Location > If Drop Build and Drop Location is Set. After the activity Copy File to Drop Location, add the activity InstrumentForPathCoverage by simpy dragging and dropping it from toolbox.

The InstrumentForPathCoverage activity takes two arguments, ReplaceBinaries and SymbolPath. Set the ReplaceBinaries argument to true if you would like your binaries to be replaced in place after instrumentation. Optionally, set SymbolPath to a location (typically a network share) where you would like path coverage symbol files to be placed after instrumentation. By default, symbol files are placed in the drop location.

Save the build template and use it for subsequent builds that you would like to debug with Holmes.

Configure test settings

Launch Microsoft Test Manager, and connect to your TFS team project. Select your test plan and in the Testing Center, select Plan and then Properties. In the test settings, select Data and Diagnostics and enable Holmes Path Coverage. This enables collection of path coverage data in subsequent test runs.

Analyze test failures

Launch visual Studio and connect to your TFS server. Then open Holmes analysis window from Tools – Holmes Statistical Debugging – Holmes Window menu option. Launch a new analysis, select