Mutation Testing in CI #1519
tob-scott-a
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
mull is a mutation testing framework for C. It can take a long time (depending on the project), and you have to set
ulimit -n 1024before anymull-runnercommands on Mac OS X or else you get a report full of useless errors.However, mutation testing is generally useful at finding gaps in test coverage. How it works is simple: It runs your test suite and identifies test coverage, then it changes your source code, AST, or binary. This is called a mutant. If the tests that touched that part of the code still pass, the mutant is said to escape. That indicates it was either a false positive (equivalent statements) or the tests didn't adequately cover it.
From my latest run before the changes in my recent PRs:
This is a respectable percentage for any project that wasn't already running mutation testing in CI.
Mutation testing complements fuzzing. I think it's worth considering as an addition. Happy to help with this, of course.
Beta Was this translation helpful? Give feedback.
All reactions