MSTest, NUnit, xUnit v3, TUnit을 위한 VSTest 및 MTP 간 테스트 필터 생성 및 변환 참조 구문을 제공합니다.
- GitHub 스타
- 5,942
- 파일
- 1
- 마지막 커밋
- 2026년 11월 11일
- 라이선스
- MIT
- 허용된 도구
- —
filter-syntax skill은 무엇을 하나요?
filter-syntax은(는) agent skill입니다. MSTest, NUnit, xUnit v3, TUnit을 위한 VSTest 및 MTP 간 테스트 필터 생성 및 변환 참조 구문을 제공합니다.
skill의 SKILL.md에서 생성된 요약입니다.
filter-syntax skill 정보
.NET 테스트 프레임워크를 위한 테스트 필터 생성 및 변환 기능을 제공합니다. VSTest 또는 MTP 환경에서 특정 명령줄 표현식을 구성해야 하는 개발자에게 참조 정보를 제공합니다. 이 SKILL은 직접 호출하기보다는 run-tests나 mtp-hot-reload와 같은 도구의 조회용으로 설계되었으며, 특정 플랫폼이나 프레임워크가 식별된 후에만 로드됩니다.
사용자는 MSTest, NUnit, xUnit v3, TUnit의 구문 규칙을 확인할 수 있습니다. 일치, 포함(contains) 연산자와 AND, OR와 같은 논리 결합 연산자 사용법을 상세히 설명합니다. 또한 VSTest에서 MTP로 필터를 마이그레이션하기 위한 변환 로직을 제공하여, 개발자가 일반 표현식을 --filter-class 또는 TUnit에서 사용하는 경로 기반 --treenode-filter와 같은 프레임워크 전용 플래그로 변환할 수 있도록 지원합니다.
agent가 수행할 수 있는 작업
- 1VSTest 필터 표현식 구성MSTest 또는 NUnit을 사용하여 특정 카테고리의 테스트를 실행하는 명령을 생성합니다.
- 2복잡한 xUnit 쿼리 실행어셈블리, 네임스페이스 및 트레이트별로 테스트를 필터링하기 위한 경로 세그먼트 쿼리를 구축합니다.
skill의 SKILL.md를 기반으로 작성되었습니다. 모든 사용 사례는 해당 문서의 인용구와 대조 확인되었습니다.
filter-syntax skill 설치 방법
각 명령은 skill 폴더를 클라이언트의 skills 디렉터리에 복사합니다. 클라이언트를 재시작하거나 새 세션을 시작하여 로드하세요.플러그인에 filter-syntax skill 설치
/plugin marketplace add dotnet/skills /plugin install dotnet-test@dotnet-agent-skills
Claude Code에 filter-syntax skill 설치
~/.claude/skills/filter-syntax/SKILL.md
$ npx degit dotnet/skills/plugins/dotnet-test/skills/filter-syntax ~/.claude/skills/filter-syntaxClaude Code (project)에 filter-syntax skill 설치
.claude/skills/filter-syntax/SKILL.md
$ npx degit dotnet/skills/plugins/dotnet-test/skills/filter-syntax .claude/skills/filter-syntaxCodex에 filter-syntax skill 설치
~/.agents/skills/filter-syntax/SKILL.md
$ npx degit dotnet/skills/plugins/dotnet-test/skills/filter-syntax ~/.agents/skills/filter-syntaxGemini CLI에 filter-syntax skill 설치
~/.gemini/skills/filter-syntax/SKILL.md
$ npx degit dotnet/skills/plugins/dotnet-test/skills/filter-syntax ~/.gemini/skills/filter-syntaxClaude.ai에 filter-syntax skill 설치
npx degit dotnet/skills/plugins/dotnet-test/skills/filter-syntax filter-syntax && zip -r filter-syntax.zip filter-syntax # claude.ai → Customize → Skills → + → Create skill → Upload a skill → filter-syntax.zip
자동 검사
2026년 11월 15일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 보안 감사는 아닙니다. 에이전트가 실행하기 전에 스크립트를 읽어 보세요. 검사 방식 · 점수를 높이기 위해 수정할 항목
- 소스 저장소 연결 및 접근 가능dotnet/skills/plugins/dotnet-test/skills/filter-syntax is public and reachablegithub.com/dotnet/skills/tree/HEAD/plugins/dotnet-test/skill ↗통과
- 오픈 소스 라이선스 (OSI)MITspdx.org/licenses/MIT.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit 2026-11-11github.com/dotnet/skills/commits ↗통과
- 스크립트에 다운로드 후 실행이나 자격 증명 탈취가 없음No scripts in the skill folder통과
- SKILL.md에 숨겨진 지침 없음No override phrases, safeguard switches, credential requests or hidden charactersgithub.com/dotnet/skills/blob/HEAD/plugins/dotnet-test/skill ↗통과
- 사전 허용 도구가 제한됨No pre-approved tools; the agent asks before using onegithub.com/dotnet/skills/blob/HEAD/plugins/dotnet-test/skill ↗통과
- SKILL.md가 Agent Skills 형식을 따름the description does not say when to use the skillgithub.com/dotnet/skills/blob/HEAD/plugins/dotnet-test/skill ↗결함 발견
SKILL.md
GitHub에서 보기Test Filter Syntax Reference
Filter syntax depends on the platform and test framework.
VSTest filters (MSTest, xUnit v2, NUnit on VSTest)
dotnet test --filter <EXPRESSION>
Expression syntax: <Property><Operator><Value>[|&<Expression>]
Operators:
| Operator | Meaning |
|---|---|
= |
Exact match |
!= |
Not exact match |
~ |
Contains |
!~ |
Does not contain |
Combinators: | (OR), & (AND). Parentheses for grouping: (A|B)&C
Supported properties by framework:
| Framework | Properties |
|---|---|
| MSTest | FullyQualifiedName, Name, ClassName, Priority, TestCategory |
| xUnit | FullyQualifiedName, DisplayName, Traits |
| NUnit | FullyQualifiedName, Name, Priority, TestCategory |
An expression without an operator is treated as FullyQualifiedName~<value>.
Examples (VSTest):
# Run tests whose name contains "LoginTest"
dotnet test --filter "Name~LoginTest"
# Run a specific test class
dotnet test --filter "ClassName=MyNamespace.MyTestClass"
# Run tests in a category
dotnet test --filter "TestCategory=Integration"
# Exclude a category
dotnet test --filter "TestCategory!=Slow"
# Combine: class AND category
dotnet test --filter "ClassName=MyNamespace.MyTestClass&TestCategory=Unit"
# Either of two classes
dotnet test --filter "ClassName=MyNamespace.ClassA|ClassName=MyNamespace.ClassB"
MTP filters — MSTest and NUnit
MSTest and NUnit on MTP use the same --filter syntax as VSTest (same properties, operators, and combinators). The only difference is how the flag is passed:
# .NET SDK 8/9 (after --)
dotnet test -- --filter "Name~LoginTest"
# .NET SDK 10+ (direct)
dotnet test --filter "Name~LoginTest"
MTP filters — xUnit (v3)
xUnit v3 on MTP uses framework-specific filter flags instead of the generic --filter expression:
| Flag | Description |
|---|---|
--filter-class "name" |
Run all tests in a given class |
--filter-not-class "name" |
Exclude all tests in a given class |
--filter-method "name" |
Run a specific test method |
--filter-not-method "name" |
Exclude a specific test method |
--filter-namespace "name" |
Run all tests in a namespace |
--filter-not-namespace "name" |
Exclude all tests in a namespace |
--filter-trait "name=value" |
Run tests with a matching trait |
--filter-not-trait "name=value" |
Exclude tests with a matching trait |
Multiple values can be specified with a single flag: --filter-class Foo Bar.
# .NET SDK 8/9
dotnet test -- --filter-class "MyNamespace.LoginTests"
# .NET SDK 10+
dotnet test --filter-class "MyNamespace.LoginTests"
# Combine: namespace + trait
dotnet test --filter-namespace "MyApp.Tests.Integration" --filter-trait "Category=Smoke"
xUnit v3 query filter language
For complex expressions, use --filter-query with a path-segment syntax:
/<assemblyFilter>/<namespaceFilter>/<classFilter>/<methodFilter>[traitName=traitValue]
Each segment matches against: assembly name, namespace, class name, method name. Use * for "match all" in any segment. Documentation: https://xunit.net/docs/query-filter-language
# xUnit.net v3 MTP — using query language (assembly/namespace/class/method[trait])
dotnet test -- --filter-query "/*/*/*IntegrationTests*/*[Category=Smoke]"
MTP filters — TUnit
TUnit uses --treenode-filter with a path-based syntax:
--treenode-filter "/<Assembly>/<Namespace>/<ClassName>/<TestName>"
Wildcards (*) are supported in any segment. Filter operators can be appended to test names for property-based filtering.
| Operator | Meaning |
|---|---|
* |
Wildcard match |
= |
Exact property match (e.g., [Category=Unit]) |
!= |
Exclude property value |
& |
AND (combine conditions) |
| |
OR (within a segment, requires parentheses) |
Examples (TUnit):
# All tests in a class
dotnet run --treenode-filter "/*/*/LoginTests/*"
# A specific test
dotnet run --treenode-filter "/*/*/*/AcceptCookiesTest"
# By namespace prefix (wildcard)
dotnet run --treenode-filter "/*/MyProject.Tests.Api*/*/*"
# By custom property
dotnet run --treenode-filter "/*/*/*/*[Category=Smoke]"
# Exclude by property
dotnet run --treenode-filter "/*/*/*/*[Category!=Slow]"
# OR across classes
dotnet run --treenode-filter "/*/*/(LoginTests)|(SignupTests)/*"
# Combined: namespace + property
dotnet run --treenode-filter "/*/MyProject.Tests.Integration/*/*/*[Priority=Critical]"
VSTest → MTP filter translation (for migration)
MSTest, NUnit, and xUnit.net v2 (with YTest.MTP.XUnit2): The VSTest --filter syntax is identical on both VSTest and MTP. No changes needed.
xUnit.net v3 (native MTP): xUnit.net v3 does NOT support the VSTest --filter syntax on MTP. Translate filters using xUnit.net v3's native options:
VSTest --filter syntax |
xUnit.net v3 MTP equivalent | Notes |
|---|---|---|
FullyQualifiedName~ClassName |
--filter-class *ClassName* |
Wildcards required for substring match |
FullyQualifiedName=Ns.Class.Method |
--filter-method Ns.Class.Method |
Exact match on fully qualified method |
Name=MethodName |
--filter-method *MethodName* |
Wildcards for substring match |
Category=Value (trait) |
--filter-trait "Category=Value" |
Filter by trait name/value pair |
| Complex expressions | --filter-query "expr" |
Uses xUnit.net query filter language (see above) |
이 스킬의 파일
1filter-syntax skill 질문
Claude Code에 filter-syntax skill을 어떻게 설치하나요?
npx degit dotnet/skills/plugins/dotnet-test/skills/filter-syntax ~/.claude/skills/filter-syntax를 실행합니다. Claude Code는 ~/.claude/skills(모든 프로젝트) 또는 .claude/skills(한 프로젝트)에서 skills를 로드하며, 설명이 작업과 일치할 때 skill을 사용합니다.
filter-syntax skill을 사용할 수 있는 클라이언트는 무엇인가요?
Agent Skills 형식을 읽는 모든 클라이언트(Claude Code, Codex, Gemini CLI, claude.ai(ZIP으로 업로드))가 사용할 수 있습니다. skill 내 스크립트는 클라이언트가 코드 실행을 허용하는 경우에만 실행됩니다.
VSTest를 사용하여 특정 카테고리의 테스트를 실행하려면 어떻게 해야 하나요?
TestCategory 속성과 일치 연산자를 사용할 수 있습니다. 예: dotnet test --filter "TestCategory=Integration".
MTP의 xUnit v3에서 표준 VSTest 필터 구문을 지원하나요?
아니요, MTP의 xUnit v3는 표준 VSTest --filter 구문을 지원하지 않으며, 프레임워크 전용 플래그나 --filter-query 옵션을 사용해야 합니다.
TUnit 트리 노드 필터링 구문은 무엇인가요?
TUnit은 --treenode-filter "/<Assembly>/<Namespace>/<ClassName>/<TestName>"와 같은 경로 기반 구문을 사용하며 와일드카드를 지원합니다.