filter-syntax

Provides test filter syntax reference for VSTest and Microsoft Testing Platform across .NET test frameworks.

1|Updated Jun 1, 2026
One-click install
npx skills add https://github.com/D1ssolve/craft-agents --skill filter-syntax-d1ssolve
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: filter-syntax
Source: https://github.com/D1ssolve/craft-agents/tree/main/skills/filter-syntax
Command: npx skills add https://github.com/D1ssolve/craft-agents --skill filter-syntax-d1ssolve

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Test filter syntax differs across platforms (VSTest vs Microsoft Testing Platform) and frameworks (MSTest, NUnit, xUnit v2/v3, TUnit), making it easy to write invalid filter expressions when running or migrating .NET tests. This Skill supplies the correct syntax for every combination so agents and developers select the right tests without trial and error. ## Core Features & Use Cases - VSTest filter reference: Documents --filter expression operators, combinators, and supported properties for MSTest, xUnit v2, and NUnit. - MTP filter coverage: Details MSTest/NUnit filters, xUnit v3 framework-specific flags (--filter-class, --filter-method, --filter-trait), the xUnit v3 query filter language, and TUnit --treenode-filter path syntax. - VSTest-to-MTP translation: Provides a mapping table for converting VSTest filter expressions to xUnit v3 native MTP equivalents during migration. - Use Case: When migrating a test suite from VSTest to Microsoft Testing Platform with xUnit v3, look up how to translate FullyQualifiedName~ClassName into --filter-class *ClassName* with correct wildcard handling. ## Quick Start Ask the agent to show the correct dotnet test filter syntax for running only integration-category tests in an xUnit v3 project 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 in the form Property Operator Value, such as TestCategory=Integration or Name~LoginTest. Combine conditions with & for AND, | for OR, and 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 logic, use --filter-query with the xUnit query filter language.

Does VSTest filter syntax work on Microsoft Testing Platform?

MSTest and NUnit on MTP support the same --filter syntax as VSTest, only the flag passing differs by SDK version. xUnit v3 on MTP does not support VSTest filters and requires its native filter flags or query language.

How do I translate VSTest filters to xUnit v3 MTP?

Map expressions like FullyQualifiedName~ClassName to --filter-class *ClassName* with wildcards, and Category=Value to --filter-trait "Category=Value". Complex expressions translate to --filter-query using the xUnit query filter language.

What filter syntax does TUnit use for test selection?

TUnit uses --treenode-filter with a path-based syntax: /Assembly/Namespace/ClassName/TestName. Wildcards work in any segment, and property filters like [Category=Smoke] can be appended to test names.