agentleFS
dprakash2101dprakash2101/dotnet-production-agent-skills/skills/unit-testing/SKILL.md

unit-testing

Skill4 starsChanged 51 days agoMITView on GitHub

Use when adding or improving focused .NET unit tests for changed business behavior or regression fixes. Prefer parameterized cases and avoid trivial redundant tests that increase CI time.

20 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use database-testing, contract-testing and 3 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.
  • petrkindlmannSkill

    database-testing

    Validate database integrity, test migrations forward and backward, verify schema constraints, manage seed data, detect migration drift, and identify query performance issues. Covers PostgreSQL, MySQL, MongoDB with Prisma, TypeORM, Drizzle, and SQLAlchemy, plus Testcontainers test databases. Use when: "database test," "migration test," "migration rollback," "rollback test," "data integrity," "SQL test," "schema validation," "seed data," "query performance," "Testcontainers." Not for: synthetic data generation/masking at scale — use test-data-management; Docker/IaC test-environment provisioning — use test-environments; SQL injection — use security-testing. Related: test-data-management, test-environments, security-testing, ci-cd-integration.

    Also in 3 projects that use this

  • petrkindlmannSkill

    contract-testing

    Implement consumer-driven contract testing with Pact-JS (v16). Covers consumer test writing, broker-driven provider verification, Pact Broker setup, can-i-deploy as a deployment gate, webhook-triggered verification, pending pacts, and schema-first vs consumer-first approaches (OpenAPI/Ajv, Schemathesis). Use when: "contract test," "Pact," "consumer-driven," "API contract," "provider verification," "can-i-deploy." Not for: stubbing or mocking a dependency to isolate a test — use service-virtualization; general REST/GraphQL endpoint assertions against your own API — use api-testing. Related: api-testing, service-virtualization, ci-cd-integration, test-environments.

    Also in 3 projects that use this

  • jarosser06Skill

    test-strategy

    Plans pytest test strategies for Drift's 90%+ coverage requirement using coverage analysis, edge case identification, and test suite design. Use when determining what tests to write, analyzing coverage gaps, or planning test strategies.

    Also in 4 projects that use this

  • etewiahSkill

    e2e-testing

    Playwright E2E testing and Lighthouse performance auditing. Use when setting up E2E tests, running Playwright tests, performing Lighthouse audits, or debugging E2E test failures.

    Also in 4 projects that use this

  • Microsoft AzureSkill

    release-readiness

    Complete ODIN release documentation and validation checks before declaring user-visible work complete, preparing a release, or opening the Release-to-main pull request.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 17 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Follow the test framework, assertion style, mocking library, naming, fixture, and data-builder conventions already present.

    line 8
  2. Distinctive:

    Follow the repository or team coverage target for new or materially changed testable business logic when one exists.

    line 10
  3. Very specific:

    When several cases exercise the same behavior with different inputs, use the repository framework's parameterized form—such as xUnit …

    line 16
  4. Distinctive:

    Do not repeatedly test framework behavior, duplicate the same branch through implementation details, or add assertions that cannot catch a …

    line 18
  5. Distinctive:

    Run the narrowest affected test first.

    line 20
  6. Distinctive:

    Use established test seams for time, randomness, cancellation and concurrency.

    line 24

“Common” is measured: kept by at least 6 in 10 of the 17 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

.NET unit testing

Follow the test framework, assertion style, mocking library, naming, fixture, and data-builder conventions already present. Do not introduce a competing framework without necessity.

Follow the repository or team coverage target for new or materially changed testable business logic when one exists. Coverage is a signal: maximize useful behavioral confidence with maintainable tests and reasonable CI time, not raw test count or percentage.

Cover applicable happy paths, validation, boundaries, null/empty cases, important branches, error behavior, and customer/region/flow-specific conditions. When shared behavior changes, verify both changed and representative unchanged consumers.

For a bug, first add a test that reproduces the failure when practical, then verify it passes after the fix. Test observable outcomes and collaborations at stable boundaries rather than private implementation details. Keep tests deterministic; control time, randomness, environment, and external I/O through existing seams.

When several cases exercise the same behavior with different inputs, use the repository framework's parameterized form—such as xUnit Theory, NUnit TestCase, or MSTest DataRow. Keep failure cases legible. Do not combine unrelated scenarios into one giant data-driven test merely to reduce method count.

Do not repeatedly test framework behavior, duplicate the same branch through implementation details, or add assertions that cannot catch a meaningful regression. Mock only meaningful boundaries and avoid excessive setup; prefer real value objects and pure collaborators where cheap.

Run the narrowest affected test first. Consider CI cost before adding slow combinations, large fixtures, or redundant integration coverage. Do not rewrite unrelated tests or mask a product defect by weakening assertions.

For a clearly user- or repository-identified POC, tests are optional; validate feasibility instead. Restore normal test expectations when experimental code becomes production code.

Use established test seams for time, randomness, cancellation and concurrency. Exercise behavior at stable boundaries; use integration tests where provider or HTTP semantics matter.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

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.