项目作者: TheSoftwareDesignLab

项目描述 :
Mutation testing for JavaScript and Node.js
高级语言: JavaScript
项目地址: git://github.com/TheSoftwareDesignLab/mutode.git
创建时间: 2017-12-13T02:54:16Z
项目社区:https://github.com/TheSoftwareDesignLab/mutode

开源协议:MIT License

下载


Mutode npm npm npm

JavaScript Style Guide
Build Status
Build status
Coverage Status
Greenkeeper badge

Mutation testing for Node.js and JavaScript.

Mutode generates mutants (small changes of code) and runs your tests. If the tests fail, it means the mutant was detected and killed; if your tests pass, it means the mutant survived and your tests can be improved.

Watch the demo video and
Check the slides of the Node Summit 2018 talk

“It’s like a test for your tests!” - @mappum

“Higher order testing: automated testing for your unit tests” - @albertomiranda

Publications

Read the tool demo paper “Mutode: generic JavaScript and Node.js mutation testing tool”. In Proceedings of the 27th ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA 2018)

Read the thesis proposal here

Install

Requires Node 8+

Globally:

  1. npm i -g mutode

Locally as a dev dependency:

  1. npm i -D mutode

Use

Globally:

  1. mutode [options] [paths]

Locally with npx:

  1. npx mutode [options] [paths]

Locally with a package.json script:

  1. {
  2. ...
  3. "scripts": {
  4. "test: "my test command",
  5. "mutode": "mutode [options] [paths]"
  6. }
  7. ...
  8. }

Options:

  1. Usage: mutode [options] [paths]
  2. Options:
  3. --concurrency, -c Concurrency of mutant runners [number] [default: 4]
  4. --mutators, -m Specific mutators to load (space separated)
  5. [array] [choices: "booleanLiterals", "conditionalsBoundary", "increments",
  6. "invertNegatives", "math", "negateConditionals", "numericLiterals",
  7. "removeArrayElements", "removeConditionals", "removeFuncCallArgs",
  8. "removeFuncParams", "removeFunctions", "removeLines", "removeObjProps",
  9. "removeSwitchCases", "stringLiterals"]
  10. -h, --help Show help [boolean]
  11. -v, --version Show version number [boolean]

Docs

  • Current supported mutation operators are available here
  • General documentation is available here

Videos

License

MIT Copyright © Diego Rodríguez Baquero