feat: implement mutation testing with Stryker - #332
Open
elijah4196 wants to merge 3 commits into
Open
Conversation
|
@elijah4196 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement Mutation Testing with Stryker
Summary
Expands ProxyPay's Stryker mutation testing from 2 modules to all 12 critical service modules, adds a score tracker with history, a live dashboard, and a fully upgraded CI workflow that enforces a minimum 70% mutation score on every PR.
Files Changed
stryker.conf.jsonmutatefrom 2 → 12 modules, added JSON reporter, updated thresholdsjest.stryker.config.jsscripts/track-mutation-score.tsreports/mutation/score-history.jsonreports/mutation/MUTATION_DASHBOARD.mdreports/mutation/html/.gitkeep.github/workflows/mutation.ymlpackage.jsontest:mutation:trackandtest:mutation:scorescriptsWhat Changed in Each File
stryker.conf.jsonmutateto 12 critical modules (was 2):feeStrategyEngine,transactionService,kyc,aml,layeredCache,currency,ledgerService,webhook,dispute,disputeStateMachinejsonreporter (required by score tracker and CI)breakthreshold from 80 → 70 (CI gate;highstays at 80 as a quality signal)stryker-tmp,tests/load,tests/flakytoignorePatternsjest.stryker.config.jsretryTimes(set to 0) — retries hide weak assertions during mutation runsscripts/track-mutation-score.tsreports/mutation/mutation.jsonafter each Stryker runreports/mutation/score-history.json(branch, commit, score, killed/survived/noCoverage counts)reports/mutation/MUTATION_DASHBOARD.mdwith trend indicator (📈/📉).github/workflows/mutation.ymlworkflow_dispatchtrack-mutation-score.tsto enforce thresholdscore-history.json+MUTATION_DASHBOARD.mdback to main on nightly runsAcceptance Criteria Met
highthreshold set to 80%;break(CI gate) at 70%score-history.jsonpersists last 100 runsRunning Locally
How to Improve the Score
npm run test:mutationlocallyreports/mutation/html/index.htmlin your browsercloses #269