Skip to content

ci: add Stryker.NET mutation testing workflow#312

Open
maximn wants to merge 1 commit into
masterfrom
maximn/stryker-mutation-testing
Open

ci: add Stryker.NET mutation testing workflow#312
maximn wants to merge 1 commit into
masterfrom
maximn/stryker-mutation-testing

Conversation

@maximn

@maximn maximn commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Summary

Adds optional Stryker.NET mutation testing as a standalone weekly (plus on-demand) CI job that never gates PRs, complementing the existing line-coverage badge by proving the test assertions actually catch regressions.

Related issue

n/a

Changes

  • Pin dotnet-stryker 4.14.2 as a local tool in .config/dotnet-tools.json for reproducible runs.
  • Add GoogleMapsApi.Test/stryker-config.json: mutate the core GoogleMapsApi library only on net10.0, perTest coverage, with a break threshold of 40 (baseline ~46%).
  • Add .github/workflows/mutation.yml: runs weekly (Monday 07:00 UTC) and on workflow_dispatch, publishes the score to the job summary and uploads the HTML report as the mutation-report artifact (no secrets needed).
  • Ignore StrykerOutput/ and document local usage in .agents/testing.md / .agents/build-release-ci.md.

Test plan

  • Ran dotnet tool restore then VCR_MODE=replay dotnet stryker locally: it built, mutated the core library, ran the offline cassette-replay suite against each mutant, and produced StrykerOutput/<ts>/reports/mutation-report.{html,md} (baseline score 46.24%), confirming the config and workflow report/artifact paths.
  • Verified the break gate works: a placeholder threshold of 60 correctly failed the run, so it was calibrated to 40.

Checklist

  • dotnet format has been run.
  • dotnet test passes locally (with a valid GOOGLE_API_KEY for integration tests).
  • Multi-framework build passes (netstandard2.0, net8.0, net10.0).
  • XML documentation updated if public API surface changed. (No public API change.)

Mutation testing proves the test assertions actually catch regressions,
complementing the existing line-coverage badge. Adds a standalone weekly
(plus on-demand) workflow that never gates PRs.

- Pin dotnet-stryker 4.14.2 as a local tool (.config/dotnet-tools.json)
- Add stryker-config.json: mutate core GoogleMapsApi only on net10.0,
  perTest coverage, break threshold at 40 (baseline ~46%)
- Add mutation.yml: weekly Monday 07:00 UTC + workflow_dispatch, publishes
  the score to the job summary and uploads the HTML report artifact
- Ignore StrykerOutput/; document local usage in .agents/testing.md
@github-actions

Copy link
Copy Markdown

🔬 TestGlance

✅ 212 passed across 1 job — 100.0% · ⏱️ 1.9s

Job Result Pass rate Duration Health
build 212/212 · 100.0% 1.9s Report
🟡 build — details

✅ 212 passed
████████████████ 100.0%
⏱️ 1.9s

vs master

Metric master PR Delta
Pass rate 100.0% 100.0% +0.0%
Duration 2.3s 1.9s -17.3%

📄 HTML Report


Updated 2026-06-17T07:15:30.629Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant