{"id":15061623,"url":"https://github.com/rsmuthu/cypress-cucumber-tagging","last_synced_at":"2025-04-10T09:15:49.419Z","repository":{"id":96068378,"uuid":"425953980","full_name":"RSMuthu/cypress-cucumber-tagging","owner":"RSMuthu","description":"Node Module to help in executing Cypress test suites/cases based on the given cucumber based tag expression","archived":false,"fork":false,"pushed_at":"2024-07-31T05:10:48.000Z","size":66,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T21:48:41.555Z","etag":null,"topics":["automation","cucumber","cucumber-tags","cypress","cypress-io","cypress-plugin","cypress-tags","tag","test-automation","testing"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/cypress-cucumber-tagging","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RSMuthu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-08T18:41:24.000Z","updated_at":"2022-11-30T15:49:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"4d50d3fc-aa6b-4af2-acba-f697c40d9ca1","html_url":"https://github.com/RSMuthu/cypress-cucumber-tagging","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/RSMuthu%2Fcypress-cucumber-tagging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RSMuthu%2Fcypress-cucumber-tagging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RSMuthu%2Fcypress-cucumber-tagging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RSMuthu%2Fcypress-cucumber-tagging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RSMuthu","download_url":"https://codeload.github.com/RSMuthu/cypress-cucumber-tagging/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248190548,"owners_count":21062285,"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":["automation","cucumber","cucumber-tags","cypress","cypress-io","cypress-plugin","cypress-tags","tag","test-automation","testing"],"created_at":"2024-09-24T23:22:53.512Z","updated_at":"2025-04-10T09:15:49.372Z","avatar_url":"https://github.com/RSMuthu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cypress-cucumber-tagging\nNode Module to help in cucumber based tag expression for executing Cypress test suite/case based on given tag expression.\n\nThe intention of this package is for helping the execution of test cases/suites specific to a feature or a scenario identified based on tags. \\\nThis is achieved by logically grouping tag expressions (cucumber styled tag expression)\n\nThis can extensively be used in cypress BDD as well.\n\n## Install\n\nAssuming you have Cypress installed, add this module as a dev dependency\n\n```shell\n# using NPM\nnpm i -D cypress-cucumber-tagging\n# using Yarn\nyarn add -D cypress-cucumber-tagging\n```\n### Support file\n\n**required:** load this module from the [support file](https://on.cypress.io/writing-and-organizing-tests#Support-file) or at the top of the spec file if not using the support file.\n\n```js\n// cypress/support/index.js\n// load and register the tag feature\n// https://github.com/RSMuthu/cypress-cucumber-tagging\nrequire('cypress-cucumber-tagging/src/support')()\n```\n\n### Plugin file\n\n**required:** load and register this module from the [plugin file](https://on.cypress.io/writing-and-organizing-tests#Plugins-file)\n\n```js\n// cypress/plugins/index.js\nmodule.exports = (on, config) =\u003e {\n  // https://github.com/RSMuthu/cypress-cucumber-tagging\n  require('cypress-cucumber-tagging/src/plugin')(config)\n  // make sure to return the config object\n  // as it might have been modified by the plugin\n  return config\n}\n```\n\nAfter loading this module from the plugin file, it allows the `cypress-cucumber-tagging` to print a little message on load, for example\n\n```shell\n$ npx cypress run --env tags=\"not (@unit or @config)\"\nThe Tag expression input for testing: \"not (@unit or @config)\"\n\n```\n\n## Use\n```shell\n# run only the tests with tag \"@unit\"\n$ npx cypress run --env tags=@unit\n# run only the tests with tag \"@unit\" or \"@config\"\n$ npx cypress run --env tags=\"@unit or @config\"\n# run only the tests with tags \"@unit\" and \"@config\"\n$ npx cypress run --env tags=\"@unit and @config\"\n# run only the tests with tags \"@unit\" and \"@config\" or the tests with tag \"@smoke\"\n$ npx cypress run --env tags=\"(@unit and @config) or @smoke\"\n# run any the tests with tags neither \"@unit\" nor \"@config\"\n$ npx cypress run --env tags=\"not (@unit or @config)\"\n```\nFor more cucumber styled tag expressions: [https://cucumber.io/docs/cucumber/api/#tag-expressions](https://cucumber.io/docs/cucumber/api/#tag-expressions)\n\n### Tags in the test config object\n\nEvery Cypress tests can have their own test config object ([Refer Here](https://on.cypress.io/configuration#Test-Configuration)), and you can put the test tags under this test config object, either as a single tag string or as an array of tags.\n\n**Note**: The tags can be added to test config to either of `it()` or `describe()`.\n\n```js\nit('Test case 1', { tags: ['@config', '@unit'] }, () =\u003e {\n  expect(true).to.be.true\n})\n\ndescribe('Test Suite 1', { tags: ['@smoke', '@config'] }, () =\u003e {\n  it('Test case 2', () =\u003e {\n    expect(true).to.be.true\n  })\n})\n```\n\nYou can run both of these test cases using `--env tags=@config` string. (all the tags of `describe()` are inherited by the `it()` wrapped under that `describe()`)\n\nAs a _**best practice**_, please use the `'@'` symbol as prefix to the tag word used in any test.\n\nAuthor: Muthu Kumaran R \u0026lt;rsmuthu@duck.com\u0026gt;\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsmuthu%2Fcypress-cucumber-tagging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frsmuthu%2Fcypress-cucumber-tagging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsmuthu%2Fcypress-cucumber-tagging/lists"}