filter-syntax

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

Updated Aug 9, 2026
One-click install
npx skills add https://github.com/adinj00/player-performance --skill filter-syntax-adinj00
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: filter-syntax
Source: https://github.com/adinj00/player-performance/tree/main/.agents/skills/filter-syntax
Command: npx skills add https://github.com/adinj00/player-performance --skill filter-syntax-adinj00

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 apply the right filter flags. ## Core Features & Use Cases - VSTest filter expressions: Documents --filter operators (=, !=, ~, !~), combinators (|, &), and supported properties per framework (MSTest, xUnit v2, NUnit). - MTP filter variants: Covers MSTest/NUnit --filter passthrough, xUnit v3 framework-specific flags (--filter-class, --filter-method, --filter-trait, --filter-query), and TUnit --treenode-filter path syntax. - VSTest-to-MTP translation table: Maps legacy VSTest filter expressions to xUnit v3 native MTP 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 TestCategory=Smoke into --filter-trait "Category=Smoke". ## Quick Start Ask the agent 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 in the form PropertyOperatorValue, such as "Name~LoginTest" or "TestCategory=Integration". Combine conditions with | for OR and & for AND, and group with parentheses.

How to filter xUnit v3 tests on Microsoft Testing Platform?

xUnit v3 on MTP uses dedicated flags instead of --filter: --filter-class, --filter-method, --filter-namespace, and --filter-trait "name=value". For complex expressions, 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 same --filter syntax works on both VSTest and MTP. xUnit v3 on native MTP does not support VSTest --filter and requires its own filter flags or query language.

How do I filter TUnit tests by category or class?

TUnit uses --treenode-filter with a path syntax like "/Assembly/Namespace/Class/Test". Append property filters such as [Category=Smoke] to a segment, use * as a wildcard, and combine conditions with & or |.

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 like Category=Value to --filter-trait "Category=Value". Complex expressions translate to --filter-query.