{"id":15597946,"url":"https://github.com/nalbion/test-filter","last_synced_at":"2025-04-03T07:44:58.745Z","repository":{"id":26938768,"uuid":"30401307","full_name":"nalbion/test-filter","owner":"nalbion","description":"Filter which tests are executed by integrating issue management systems","archived":false,"fork":false,"pushed_at":"2015-04-16T14:20:19.000Z","size":380,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-15T20:04:59.284Z","etag":null,"topics":["logging","test"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nalbion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-06T07:49:13.000Z","updated_at":"2023-05-15T23:35:31.000Z","dependencies_parsed_at":"2022-09-02T02:41:03.932Z","dependency_job_id":null,"html_url":"https://github.com/nalbion/test-filter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nalbion%2Ftest-filter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nalbion%2Ftest-filter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nalbion%2Ftest-filter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nalbion%2Ftest-filter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nalbion","download_url":"https://codeload.github.com/nalbion/test-filter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246961923,"owners_count":20861177,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["logging","test"],"created_at":"2024-10-03T01:24:34.669Z","updated_at":"2025-04-03T07:44:58.728Z","avatar_url":"https://github.com/nalbion.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# test-filter\nFilter which tests are executed by integrating issue management systems.\nUses javadoc-style annotations to associate tests/specs with issues and their current status and target release/milestone.\n\nThe system adds annotations such as `@status open` and `@release 1.2.3` to suite/test/spec annotated with an issue.\nYou can also add these annotations directly to your specs, and the system will update them if you also have\nan issue annotation on the same spec.  Unless you explicitly specify a target release on the command line\nthe system will use the version specified in `package.json`.  These annotations are used to filter out\ntests that you don't want to be run.\n\nYou can also execute only tests that relate to a specific issue by providing the `issue=123` argument on the command line.\n\nCurrently only Jasmine and Karma are supported.  If you're using Cucumber on a java project you might\nbe interested in [cucumber-jira](https://github.com/nalbion/cucumber-jira) and\n[jira-maven-plugin](https://github.com/nalbion/jira-maven-plugin/tree/feature/generate-cucumber-features#generate-tests)'s `generate-tests` goal.\n\n## Usage\n\n    npm install --save-dev test-filter\n\nThis module uses the `\"bugs\": {\"url\": \"XXX\"` value in your `package.json` file\nto determine how to connect to the issue management system.\n\n### Protractor\nNote: Requires *protractor 1.7.0* or greater.\n\n#### protractor.conf.js\n\n    exports.config = {\n      ...\n      framework: 'custom',\n      frameworkPath: '../../node_modules/test-filter/lib/tools/protractor-jasmine.js',\n      ...\n      testFilterOptions: {\n        // See the Optional Arguments section below\n      },\n      ...\n      onPrepare: function() {\n        var JasmineSpecFilter = require('test-filter/lib/tools/jasmine/jasmine-spec-filter'),\n            issues = null,\n            jasmineSpecFilter = new JasmineSpecFilter(issues, testFilterOptions);\n\n        jasmine.getEnv().specFilter = jasmineSpecFilter.jasmineSpecFilter;\n      }\n      ...\n    }\n\n### Jasmine\nTest Filter can be used as a Jasmine wrapper:\n\n    test-filter jasmine\n\nFor details on the [optional arguments](#Optional%20Arguments) see below.\n\nAdd javadoc-style annotations to your spec files:\n\n    /**\n     * @issue 1\n     */\n    describe('Test suite for Issue 1', function() {\n       /**\n        * @issue 2\n        */\n        it('should skip this test if either issue 1 or 2 are open', function() {\n        });\n    });\n\n### Karma\nTest-filter can also be used as a Karma preprocessor:\n\n    test-filter karma [start|run [karma.conf.js] issue=123|release=1.2.3]\n\nFor details on the [optional arguments](#Optional%20Arguments) see below.\n\n#### karma.conf.js\n\n    module.exports = function(config) {\n        config.set({\n            frameworks: ['jasmine'],\n            ...\n            plugins: [\n                'karma-jasmine',\n                {'preprocessor:test-filter': ['factory', require('test-filter/lib/tools/karma/karma-test-filter-preprocessor')]}\n            ],\n            preprocessors: {\n                '**/*-spec.js': ['test-filter']\n            }\n\n\n### Optional Arguments\n\n - `--offline` - If you're unable to connect to the issue management system\n - `--preserve-specs` - By default test-filter will add \u0026 update the annotations in your spec files.\n - `group=xxx` and `repo=yyy` - Not required for GitHub and BitBucket\n - `release=1.2.3` - By default test-filter will use the `version` in your package.json file,\n    along with the target release/milestone of each issue to determine which tests to run/skip.\n - `issue=123` - Run only issues associated with a specific issue.\n - `system=jira` - is only required if \u003ccode\u003ebugs.url\u003c/code\u003e is not specified in `package.json`\n                 and the URL does not imply the system used.  Valid values: 'github' or 'bitbucket'.\n\n#### GitHub\n\n - `timeout=60000` - Timeout in ms (defaults to 5 seconds)\n - `host=issues.domain.com` and `pathPrefix=prefix` - Only required for GitHub Enterprise\n\n#### BitBucket\nWhen connecting to BitBucket, you must provide your BitBucket username \u0026 password:\n\non the command line:\n\n    test-filter jasmine username=someone password=secret\n\n...or in `~/.netrc`:\n\n    machine bitbucket.org\n      login yourusername\n      password yourpassword\n\n\n#### JIRA\nNot yet implemented\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnalbion%2Ftest-filter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnalbion%2Ftest-filter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnalbion%2Ftest-filter/lists"}