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
- Host: GitHub
- URL: https://github.com/slxiao/test-funnel
- Owner: slxiao
- Created: 2019-07-22T08:33:50.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-10-25T03:45:53.000Z (8 months ago)
- Last Synced: 2025-03-09T13:03:51.021Z (3 months ago)
- Topics: dependencies, javascript, regression-test-selection, regression-testing, unit-testing
- Language: JavaScript
- Homepage:
- Size: 1.12 MB
- Stars: 22
- Watchers: 3
- Forks: 2
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
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](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