TFSを使用していないため、TFSで使用できる設定の種類はわかりませんが、 NUnitとMSTestの両方でCategoriesを使用できることはわかっています。
NUnit を使用したソリューション
NUnit を使用すると、単一のテストまたはフィクスチャ全体をCategory
-Attributeでマークできます。
namespace NUnit.Tests
{
using System;
using NUnit.Framework;
[TestFixture]
[Category("IntegrationTest")]
public class IntegrationTests
{
// ...
}
}
また
namespace NUnit.Tests
{
using System;
using NUnit.Framework;
[TestFixture]
public class IntegrationTests
{
[Test]
[Category("IntegrationTest")]
public void AnotherIntegrationTest()
{
// ...
}
}
}
nunit-console.exe を使用するもののみを実行します。
nunit-console.exe myTests.dll /include:IntegrationTest
MSTest によるソリューション
MSTest のソリューションは非常に似ています。
namespace MSTest.Tests
{
[TestClass]
public class IntegrationTests
{
[TestMethod]
[TestCategory("IntegrationTests")
public void AnotherIntegrationTest()
{
}
}
}
ただし、ここではすべてのテストをその属性でマークする必要があります。クラス全体を装飾するために使用することはできません。
次に、NUnit と同様に、IntegrationTestsカテゴリでこれらのテストのみを実行します。
VSTest.Console.exe の使用
Vstest.console.exe myTests.dll /TestCaseFilter:TestCategory=IntegrationTests
MSTest.exe の使用
mstest /testcontainer:myTests.dll /category:"IntegrationTests"
編集
VS の TestExplorer を使用して特定の Test-Categories を実行することもできます。

(ソース: s-msft.com )
上の画像に見られるように、TestExplorer の左上隅でカテゴリを選択できます。特性を選択し、必要なカテゴリのみを実行します。
詳細については、 MSDNを参照してください。