test-funnel
v1.1.2
Published
Javascript test selector
Downloads
18
Maintainers
Readme
test-funnel
test-funnel is an Javascript unit test selector. It can dynamically select test cases that are impacted by modified source files for execution, thus improving test efficiency and saving developer time. Generally speaking, it is one kind of Regression Test Selection technology.
Some key points of test-funnel:
- It supports both Mocha and Jest frameworks
- Case selection algorithm is built on the awesome madge library
- Support specify commits for changed files extraction
- Support extration, selection and exectution in one command
Installation
$ npm -g install test-funnel
CLI Usgae
After installed, command test-funnel
will be available. Run command test-funnel -h
to get help guidelines.
Usage: test-funnel [options]
Options:
-V, --version output the version number
-b, --basefolder <path> folder of git repository, default: ./
-t, --testfolder <path> folder of test files, default: test
-e, --testfileextention <name> extention of test files, default: test.js
-n, --newcommit <name> new commit for comparison, default: HEAD~0
-o, --oldcommit <name> old commit for comparison, default: HEAD~1
-r, --runner <name> test runner, could be one of jest/mocha, not trigger runner if not specified
-h, --help output usage information
API Usage
var Funnel = require('test-funnel');
Funnel ({
baseFolder: "./",
testFolder: "test",
testFileExtention: "test.js",
newCommit: "HEAD~0",
oldCommit: "HEAD~1",
runner: ""
});
License
MIT License