If you are using Microsoft Test Manager on a Team Project that was created prior to TFS 2010 (and was later upgraded to 2010), or you built your own process template, you will need to use the TCM tool to enable the automatic creation of a work item when a test finds a bug through MTM. The TCM tool lets you import/export a mapping file into TFS. This is also very useful if you want MTM to create a different type of work item than the one that is currently configured or if you want different fields to be pre-populated.
The tool is executed this way, and you can run it from the Visual Studio Command Prompt:
tcm bugfieldmapping /import /mappingfile:”c:\temp\myfile.xml” /collection:http://tfs:8080/tfs/DefaultCollection /teamproject:MyProject
The mapping file looks something like this:
xml version="1.0" encoding="utf-16"?> <BugFilerMappings workitemtypetocreate="Bug"> <ReproSteps>Microsoft.VSTS.TCM.ReproStepsReproSteps> <SystemInformation>Microsoft.VSTS.TCM.SystemInfoSystemInformation> <BuildFoundIn>Microsoft.VSTS.Build.FoundInBuildFoundIn> BugFilerMappings>