Senior Software Developer @ Inalambria ▸ Senior Undergrad Student @ Universidad de los Andes ▸ Next: Masters of Software Engineering ▸ FOSS Contributor
to assess test suite effectiveness ▸ 100% statement/branch/function coverage is not enough ▸ Inserts faults that resemble real world bugs ▸ Mutants ▸ Runs your test suite ▸ Did your test suite catch the mutant?
your tests as many times as there is mutants ▸ e.g. request ▸ ~28 second test suite ▸ 4247 generated mutants ▸ Over 4 hours to complete on a powerful MacBook
& dynamic analysis to guide mutation testing ▸ 30+ Operators ▸ Not maintained for almost 3 years Shabnam Mirshokraie, Ali Mesbah, and Karthik Pattabiraman. 2013. Efficient JavaScript mutation testing. In ICST’13. 74–83. https://github.com/saltlab/mutandis/
operators ▸ Works for JavaScript and TypeScript ▸ Actively maintained ▸ Supports Jest, React, Karma, Mocha, Jasmine, Webpack, Angular ▸ Requires plugins and configuration to work https://github.com/stryker-mutator/stryker
operators ▸ Works with any testing framework ▸ Optional configuration https://github.com/TheSoftwareDesignLab/mutode Rodríguez-Baquero, Diego, and Mario Linares-Vásquez. 2018. ”Mutode: generic JavaScript and Node.js mutation testing tool." In ISSTA’18, pp. 372-375.
app/module ▸ Generate mutants > Queue ▸ Insert mutants into those copies ▸ Run `npm test` ▸ Check exit code and mark mutant as killed/survived ▸ No exit (Timeout) > Discarded mutant ▸ Report results
statement with at least 1 mutant ▸ Gather data for future analysis ▸ Optimize generation of mutants ▸ Only mutate lines covered by test suite ▸ Prioritize certain operators and create less mutants
of mutants ▸ Only run tests that cover mutated line ▸ Skip similar mutants if previous are all killed/survived ▸ Higher order mutation testing ▸ Mix 2 or more mutants (imagine the time required) ▸ Find best combinations