agentleFS
MicrosoftKnown publishermicrosoft/vs-mef/.agents/skills/testing/SKILL.md

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
  1. Very specific:

    Use --filter-method, --filter-class, and --filter-namespace for simple filtering

    line 62
  2. Very specific:

    Use --filter-trait and --filter-not-trait for trait-based filtering

    line 63

“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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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 test directory) per shipping project (under the src directory). Test projects are named after the project being tested with a .Tests suffix.
  • Tests use xUnit v3 with Microsoft.Testing.Platform (MTP v2).

Running Tests

Run all tests:

dotnet test --no-build -c Release

Run tests for a specific test project:

dotnet test --project test/Microsoft.VisualStudio.Composition.Tests/Microsoft.VisualStudio.Composition.Tests.csproj --no-build -c Release

Run a single test method:

dotnet test --project test/Microsoft.VisualStudio.Composition.Tests/Microsoft.VisualStudio.Composition.Tests.csproj --no-build -c Release -- --filter-method ClassName.MethodName

Run 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 ClassName

Run 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.0

List all available tests without running them:

cd test/Microsoft.VisualStudio.Composition.Tests
dotnet run --no-build -c Release --framework net8.0 -- --list-tests

Key points about test filtering with xUnit v3 / MTP v2:

  • Options after -- are passed to the test runner, not to dotnet test
  • Use --filter-method, --filter-class, and --filter-namespace for simple filtering
  • Use --filter-trait and --filter-not-trait for trait-based filtering
  • Traditional VSTest --filter expressions do NOT work
  • Wildcards * are supported at the beginning and/or end of filter values
  • See --help for the query filter language for advanced scenarios

Download now (ZIP)

  • Other versions191 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 5

    1. microsoft/vs-threading★ 1k70% same
    2. microsoft/vs-streamjsonrpc★ 94258% same
    3. microsoft/vs-validation★ 14362% same
    4. microsoft/vs-servicehub★ 3220% same
    5. microsoft/vssdktestfx★ 2363% same

    Wrote their own version · 186

    1. modelcontextprotocol/servers★ 92ksame name
    2. lobehub/lobehub★ 84ksame name
    3. lobehub/lobe-chat★ 83ksame name
    4. penpot/penpot★ 62ksame name
    5. meteor/meteor★ 45ksame name
    6. iOfficeAI/AionUi★ 34ksame name
    7. garrytan/gbrain★ 31ksame name
    8. OpenZeppelin/openzeppelin-contracts★ 27ksame name
    9. tursodatabase/turso★ 25ksame name
    10. 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.
    • zetaloopSkill

      assign-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-NeMoSkill

      build-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

    • timmo001Skill

      changeset-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-NeMoSkill

      linting-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

    • JetBrainsSkill

      module-dependencies

      Add or modify IntelliJ module dependencies in `.iml` files.

      Also in 3 projects that use this

    • CES-LtdSkill

      oss-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.

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.