The required category ‘Microsoft.TestCaseCategory’ does not exist in team project ‘[projectname]’

If you are trying to connect Microsoft Test Manager to a Team Project that was created with TFS 2008, then you will very likely get this error: “The required category ‘Microsoft.TestCaseCategory’ does not exist in team project ‘[projectname]’”.  This has to do with the workitem categories that are used by MTM.  Basically, you group different workitem types into categories, which then allow MTM (and also TFS queries) to work with specific workitem types.  The easiest way to get this fixed is to export the categories from a 2010 Team Project, and then import them to your team project:

>witadmin exportcategories /collection:http://MyTFS:8080/tfs/DefaultCollection /p:”Project1″ /f:”C:\temp\Categories.xml”

>witadmin importcategories /collection:http://MyTFS:8080/tfs/DefaultCollection /p:”Project2″ /f:”C:\temp\Categories.xml”

The file looks something like this:

xml version="1.0" encoding="utf-8"?>
<cat:CATEGORIES xmlns:cat="">
  <CATEGORY refname="Microsoft.BugCategory" name="Bug Category">
  <CATEGORY refname="Microsoft.RequirementCategory" name="Requirement Category">
    <DEFAULTWORKITEMTYPE name="User Story" />
  <CATEGORY refname="Microsoft.SharedStepCategory" name="Shared Step Category">
    <DEFAULTWORKITEMTYPE name="Shared Steps" />
  <CATEGORY refname="Microsoft.TestCaseCategory" name="Test Case Category">
    <DEFAULTWORKITEMTYPE name="Test Case" />

Of course, you need to make sure that your team project has a “Share Steps” and “Test Case” workitem types defined, which you can also import from your 2010 project (witexport, witimport).

About esteban

Esteban is the Founder and Chief Technologist at Nebbia Technology, an ALM consulting and Azure-powered technology company. He is a software developer with a passion for ALM, TFS, Azure, and software development best practices. Esteban is a Microsoft Visual Studio ALM MVP and ALM Ranger, Pluralsight author, and the president of ONETUG (Orlando .NET User Group).

2 thoughts on “Test Case Charts in TFS 2013 Update 4

  1. Dew Drop – November 18, 2014 (#1898) | Morning Dew

    […] Test Case Charts in TFS 2013 Update 4 (Esteban Garcia) […]

  2. Hoang

    Thanks, it helped me a lot.

Leave a Reply

Your email address will not be published. Required fields are marked *

Are you human? *