filter-syntax

Provides test filter syntax reference for VSTest and Microsoft Testing Platform across MSTest, NUnit, xUnit, and TUnit.

1|Updated Jul 27, 2026
One-click install
npx skills add https://github.com/FittyAr/Cardscape --skill filter-syntax-fittyar
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: filter-syntax
Source: https://github.com/FittyAr/Cardscape/tree/main/.agents/skills/filter-syntax
Command: npx skills add https://github.com/FittyAr/Cardscape --skill filter-syntax-fittyar

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Test filter syntax differs across platforms (VSTest vs Microsoft Testing Platform) and frameworks (MSTest, NUnit, xUnit v3, TUnit), making it easy to write invalid filter expressions when running or migrating .NET test suites. ## Core Features & Use Cases - VSTest filter reference: Documents --filter expression syntax, operators, combinators, and supported properties per framework. - MTP filter reference: Covers MSTest/NUnit passthrough syntax, xUnit v3 framework-specific flags and query filter language, and TUnit --treenode-filter path syntax. - VSTest-to-MTP translation table: Maps legacy VSTest filter expressions to xUnit v3 native equivalents for migration workflows. - Use Case: When migrating a test suite from VSTest to Microsoft Testing Platform with xUnit v3, look up how to convert FullyQualifiedName~ClassName into --filter-class *ClassName*. ## Quick Start Ask the AI to show the correct filter syntax for running only integration tests in xUnit v3 on Microsoft Testing Platform.

Frequently Asked Questions about filter-syntax

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I filter tests with dotnet test --filter?▼

Use dotnet test --filter with expressions like Property Operator Value, for example "TestCategory=Integration" or "Name~LoginTest". Combine conditions with & for AND and | for OR, and use parentheses for grouping.

How to filter xUnit v3 tests on Microsoft Testing Platform?▼

xUnit v3 on MTP uses framework-specific flags like --filter-class, --filter-method, --filter-namespace, and --filter-trait instead of the generic --filter expression. For complex cases, use --filter-query with the xUnit query filter language.

Does VSTest filter syntax work on Microsoft Testing Platform?▼

For MSTest, NUnit, and xUnit v2 the VSTest --filter syntax works identically on MTP. xUnit v3 does not support VSTest --filter syntax on MTP and requires its native filter flags or query language instead.

How do I filter TUnit tests by category or class?▼

TUnit uses --treenode-filter with a path syntax like "/Assembly/Namespace/Class/Test" supporting wildcards in any segment. Append property filters such as [Category=Smoke] or [Category!=Slow] to match or exclude test properties.

How to translate VSTest filters to xUnit v3 MTP equivalents?▼

Map FullyQualifiedName~ClassName to --filter-class *ClassName*, Name=MethodName to --filter-method *MethodName*, and trait filters to --filter-trait "Category=Value". Complex expressions translate to --filter-query using the xUnit query filter language.