Maintenance in progress: we are indexing a large batch of new skills. Some pages may load slowly or briefly show no results. Nothing is lost, and everything is back to normal within the hour.

Mutation Test

Run mutation testing to validate test suite quality

majiayu000 674f09b 2 files · 2.1 KB Updated 567 repo stars

File contents

Mutation Testing with Stryker

Run mutation testing to verify your test suite actually catches bugs.

For .NET (Stryker.NET)

dotnet tool install -g dotnet-stryker
cd src/backend/Tests/MatchingServiceTests
dotnet stryker

Configure stryker-config.json:

{
  "stryker-config": {
    "project": "CandidateMatchingEngine.csproj",
    "mutate": ["**/Services/**/*.cs", "!**/Generated/**"],
    "thresholds": { "high": 80, "low": 60, "break": 40 },
    "reporters": ["html", "json", "progress"],
    "concurrency": 4
  }
}

For TypeScript/JavaScript (StrykerJS)

npx stryker init
npx stryker run

Interpreting Results

  • Killed: Test caught the mutation (GOOD)
  • Survived: Tests missed the change (BAD -- add tests)
  • Mutation score = killed / (killed + survived) -- target >60%

CI Integration

- script: dotnet stryker --threshold-break 40
  displayName: "Mutation Testing"
  condition: eq(variables['Build.Reason'], 'PullRequest')

Arguments

  • --project=<path>: Path to test project
  • --threshold=<n>: Break build if score below this (default: 60)

majiayu000/claude-skill-registry-data/tree/main/testing/mutation-test-erp-core-dev-eagles-claude-config commit 674f09bf7b

Frequently asked questions

npx skillmds add majiayu000/mutation-test-2