An open API service indexing awesome lists of open source software.

https://github.com/slxiao/test-funnel

⌛️ test selector for Javascript
https://github.com/slxiao/test-funnel

dependencies javascript regression-test-selection regression-testing unit-testing

Last synced: 3 months ago
JSON representation

⌛️ test selector for Javascript

Awesome Lists containing this project

README

        

# test-funnel


Last version

Build Status




**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](https://users.oden.utexas.edu/~sbiswas/files/papers/informaticasurvey.pdf) technology.

Some key points of **test-funnel**:
- It supports both Mocha and Jest frameworks
- Case selection algorithm is built on the awesome [madge](https://github.com/pahen/madge) library
- Support specify commits for changed files extraction
- Support extration, selection and exectution in one command

[中文介绍](https://mp.weixin.qq.com/s/jDQbcYF_h0IQNNzQiseokg)

# Installation
```shell
$ npm -g install test-funnel
```
# CLI Usgae
After installed, command `test-funnel` will be available. Run command `test-funnel -h` to get help guidelines.
```shell
Usage: test-funnel [options]

Options:
-V, --version output the version number
-b, --basefolder folder of git repository, default: ./
-t, --testfolder folder of test files, default: test
-e, --testfileextention extention of test files, default: test.js
-n, --newcommit new commit for comparison, default: HEAD~0
-o, --oldcommit old commit for comparison, default: HEAD~1
-r, --runner test runner, could be one of jest/mocha, not trigger runner if not specified
-h, --help output usage information
```

# API Usage
```js
var Funnel = require('test-funnel');

Funnel ({
baseFolder: "./",
testFolder: "test",
testFileExtention: "test.js",
newCommit: "HEAD~0",
oldCommit: "HEAD~1",
runner: ""
});
```
# License
MIT License