Test: Added Stryker Mutator (Dynamic Analysis)#99
Merged
Conversation
Pull Request Test Coverage Report for Build 18956348932Details
💛 - Coveralls |
… test.yaml to run stryker per PR on CI
aliciach1
requested changes
Oct 30, 2025
aliciach1
left a comment
There was a problem hiding this comment.
please remove output file in reports/mutation/mutation.json. Otherwise, looks good!
Author
Removed! thanks |
aliciach1
approved these changes
Oct 30, 2025
aliciach1
left a comment
There was a problem hiding this comment.
checked out branch locally and ran tests, tests pass. Changes thoroughly implements Stryker Mutator into CI pipeline and doesn't break anything.
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.
Summary
How Stryker Mutator Works
Evidence that you had successfully installed the tool
package.json:"@stryker-mutator/mocha-runner": "^9.2.0"stryker.config.jsonwas created in the root directoryArtifacts that demonstrate that you have successfully run the tool on your repository
NODE_ENV=test DISABLE_EMAIL=true npx mocha test/categories.jsto make sure that the non-mutated code passes all tests.npx stryker run --logLevel infoto run Stryker mutator onsrc/categories/create.jsWhat types of problems are you hoping your tooling will catch? What types of problems does this particular tool catch?
What types of customization are possible or necessary?
A PRIORI CUSTOMIZATION (initial setup)
"mutate": [ "src/categories/**/*.js" ],mochaandcommandignorePatterns): prevents sandbox from copying gigabytes of data. It is not necessary but would be good to have."timeoutMS": 300000, "timeoutFactor": 1.5, "concurrency": 4html(local debugging),progress(terminal feedback), andclear-text(CI logs) turned onstryker-sandbox-bootstrap.jsOVER TIME CUSTOMIZATION (ongoing tuning)
"mutator": { "excludedMutations": ["BooleanSubstitution", "StringLiteral"] }"thresholds": { "high": 80, "low": 60, "break": 50 }How can/should this tool be integrated into a development process?
srcfolder before merging to main, but most often run Stryker with incremental mode so Stryker only re-tests changed files when we create our pull requests.Are there many false positives? False negatives? True positive reports about things you don’t care about?
const smallestOrder = firstChild.length ? firstChild[0].score - 1 : 1;mutated toconst smallestOrder = firstChild.length ? firstChild[0].score + 1 : 1;but the test cases did not catch itdescription: data.description ? data.description : '', → description: data.description ? data.description : "Stryker was here!"[Survived] ConditionalExpression src/categories/create.js:216:7 - if (copyParent) { + if (true) {, sinceif (copyParent)is essentially the same as sayingif (copyParent == true)