testing
Skill469 starsChanged 4 months agoMITView on GitHub
Provides guidance and instructions for writing, running and filtering tests.
We split this skill into the rules it gives an agent
2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 171 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 62
Use --filter-method, --filter-class, and --filter-namespace for simple filtering
- Very specific: line 63
Use --filter-trait and --filter-not-trait for trait-based filtering
“Common” is measured: kept by at least 6 in 10 of the 171 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
IMPORTANT: This repository uses xUnit v3 with Microsoft.Testing.Platform (MTP v2). Traditional VSTest --filter syntax does NOT work. Use the options below instead.
- There should generally be one test project (under the
testdirectory) per shipping project (under thesrcdirectory). Test projects are named after the project being tested with a.Testssuffix. - Tests use xUnit v3 with Microsoft.Testing.Platform (MTP v2).
Running Tests
Run all tests:
dotnet test --no-build -c ReleaseRun tests for a specific test project:
dotnet test --project test/Microsoft.VisualStudio.Composition.Tests/Microsoft.VisualStudio.Composition.Tests.csproj --no-build -c ReleaseRun a single test method:
dotnet test --project test/Microsoft.VisualStudio.Composition.Tests/Microsoft.VisualStudio.Composition.Tests.csproj --no-build -c Release -- --filter-method ClassName.MethodNameRun all tests in a test class:
dotnet test --project test/Microsoft.VisualStudio.Composition.Tests/Microsoft.VisualStudio.Composition.Tests.csproj --no-build -c Release -- --filter-class ClassNameRun tests with wildcard matching (supports wildcards at beginning and/or end):
dotnet test --project test/Microsoft.VisualStudio.Composition.Tests/Microsoft.VisualStudio.Composition.Tests.csproj --no-build -c Release -- --filter-method "*Pattern*"Run tests with a specific trait:
dotnet test --project test/Microsoft.VisualStudio.Composition.Tests/Microsoft.VisualStudio.Composition.Tests.csproj --no-build -c Release -- --filter-trait "TraitName=value"Exclude tests with a specific trait:
dotnet test --project test/Microsoft.VisualStudio.Composition.Tests/Microsoft.VisualStudio.Composition.Tests.csproj --no-build -c Release -- --filter-not-trait "TestCategory=FailsInCloudTest"Run tests for a specific framework only:
dotnet test --project test/Microsoft.VisualStudio.Composition.Tests/Microsoft.VisualStudio.Composition.Tests.csproj --no-build -c Release --framework net8.0List all available tests without running them:
cd test/Microsoft.VisualStudio.Composition.Tests
dotnet run --no-build -c Release --framework net8.0 -- --list-testsKey points about test filtering with xUnit v3 / MTP v2:
- Options after
--are passed to the test runner, not todotnet test - Use
--filter-method,--filter-class, and--filter-namespacefor simple filtering - Use
--filter-traitand--filter-not-traitfor trait-based filtering - Traditional VSTest
--filterexpressions do NOT work - Wildcards
*are supported at the beginning and/or end of filter values - See
--helpfor the query filter language for advanced scenarios
Other versions191 projects use a version of this.
Word for word · 0
None found.
Edited · 5
- microsoft/vs-threading★ 1k70% same
- microsoft/vs-streamjsonrpc★ 94258% same
- microsoft/vs-validation★ 14362% same
- microsoft/vs-servicehub★ 3220% same
- microsoft/vssdktestfx★ 2363% same
Wrote their own version · 186
- modelcontextprotocol/servers★ 92ksame name
- lobehub/lobehub★ 84ksame name
- lobehub/lobe-chat★ 83ksame name
- penpot/penpot★ 62ksame name
- meteor/meteor★ 45ksame name
- iOfficeAI/AionUi★ 34ksame name
- garrytan/gbrain★ 31ksame name
- OpenZeppelin/openzeppelin-contracts★ 27ksame name
- tursodatabase/turso★ 25ksame name
- redis/go-redis★ 22ksame name
176 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use assign-copilot, build-and-dependency and 8 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
zetaloopSkillassign-copilot
Assigns a GitHub issue to the Copilot coding agent, optionally specifying a custom agent. Use this when asked to assign an issue to Copilot or delegate an issue to CCA.
Also in 3 projects that use this
NVIDIA-NeMoSkillbuild-and-dependency
Build and dependency management for NeMo-RL. Covers Docker image building and running, uv usage, venv setup, and adding dependencies.
Also in 3 projects that use this
timmo001Skillchangeset-scope
Keep all scoped code work contained to the user-defined changeset. Use for implementation, fixes, diagnosis, refactoring, cleanup, and review when explicit instructions, named files, diffs, branches, pull requests, or injected work scopes define the boundary.
Also in 3 projects that use this
NVIDIA-NeMoSkilllinting-and-formatting
Code style guidelines for NeMo-RL (Python and shell). Covers naming, indentation, comments, docstrings, reflection avoidance, and uv usage.
Also in 3 projects that use this
JetBrainsSkillmodule-dependencies
Add or modify IntelliJ module dependencies in `.iml` files.
Also in 3 projects that use this
CES-LtdSkilloss-pr
Use when creating a pull request, after committing changes, or when user invokes /oss-pr. Covers branch management, quality checks, commit, push, and PR creation.
Also in 3 projects that use this
In this repository3 other files it gives its agents.
- AGENTS.mdAGENTS.md
- bundle-dependency-prsSkill
- update-library-templateSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

