This folder contains the code similar the example shown in the slides. The mutation testing framework Stryker is used to realize the mutation testing itself.
To try out the demo, Node.js is needed.
- Get the dependencies via
npm install
- Check out ./src/index.js and the corresponding test file.
- Run the original test suite with
npm run test:original
- See the two tests from ./src/tests/index.js passing and the mutation score
- Run the test suite with the new test that would kill the mutant with
npm run test:with-fix
- See that the test is failing
- Fix the bug in the function in ./src/index.js (hint: check the slides)
- Run the test suite with the new test again (
npm run test:with-fix
) - See that all mutants were killed!
- ???
- Profit