{"id":15270342,"url":"https://github.com/enkessler/cuke_cataloger","last_synced_at":"2025-07-18T11:39:31.776Z","repository":{"id":16724457,"uuid":"19481517","full_name":"enkessler/cuke_cataloger","owner":"enkessler","description":"A handy gem for adding identifier tags to Cucumber tests.","archived":false,"fork":false,"pushed_at":"2022-02-06T04:09:44.000Z","size":376,"stargazers_count":12,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T01:51:11.222Z","etag":null,"topics":["catalogue","cucumber"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/enkessler.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-06T04:54:23.000Z","updated_at":"2024-07-11T15:46:41.000Z","dependencies_parsed_at":"2022-07-19T06:02:05.364Z","dependency_job_id":null,"html_url":"https://github.com/enkessler/cuke_cataloger","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enkessler%2Fcuke_cataloger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enkessler%2Fcuke_cataloger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enkessler%2Fcuke_cataloger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enkessler%2Fcuke_cataloger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/enkessler","download_url":"https://codeload.github.com/enkessler/cuke_cataloger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248142907,"owners_count":21054672,"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":["catalogue","cucumber"],"created_at":"2024-09-30T07:08:24.835Z","updated_at":"2025-04-12T06:30:59.846Z","avatar_url":"https://github.com/enkessler.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Basic stuff:\n[![Gem Version](https://badge.fury.io/rb/cuke_cataloger.svg)](https://rubygems.org/gems/cuke_cataloger)\n[![Project License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/mit-license.php)\n[![Downloads](https://img.shields.io/gem/dt/cuke_cataloger.svg)](https://rubygems.org/gems/cuke_cataloger)\n\nUser stuff:\n[![Cucumber Docs](http://img.shields.io/badge/Documentation-Features-green.svg)](https://github.com/enkessler/cuke_cataloger/tree/master/testing/cucumber/features)\n[![Yard Docs](http://img.shields.io/badge/Documentation-API-blue.svg)](https://www.rubydoc.info/gems/cuke_cataloger)\n\nDeveloper stuff:\n[![Build Status](https://github.com/enkessler/cuke_cataloger/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/enkessler/cuke_cataloger/actions/workflows/ci.yml?query=branch%3Amaster)\n[![Coverage Status](https://coveralls.io/repos/github/enkessler/cuke_cataloger/badge.svg?branch=master)](https://coveralls.io/github/enkessler/cuke_cataloger?branch=master)\n[![Maintainability](https://api.codeclimate.com/v1/badges/662f0e7aa69bf9725515/maintainability)](https://codeclimate.com/github/enkessler/cuke_cataloger/maintainability)\n[![Inline docs](http://inch-ci.org/github/enkessler/cuke_cataloger.svg?branch=master)](https://inch-ci.org/github/enkessler/cuke_cataloger)\n\n\n---\n\n\n# CukeCataloger\n\n\nThe cuke_cataloger gem is a convenient way to provide a unique id to every test case in your Cucumber test suite.\n\nTurn your features from this\n\n````\nFeature:\n\n  Scenario:\n    * a step\n    \n  Scenario Outline:\n    * a step\n  Examples:\n    | param 1 |\n    | value 1 |\n  Examples: \n    | param 1 |\n    | value 1 |\n    | value 2 |\n\n  Scenario:\n    * a step\n````\n\ninto this!\n\n````\nFeature:\n\n  @test_case_1\n  Scenario:\n    * a step\n    \n  @test_case_2\n  Scenario Outline:\n    * a step\n  Examples:\n    | param 1 | test_case_id |\n    | value 1 | 2-1          |\n  Examples: \n    | param 1 | test_case_id |\n    | value 1 | 2-2          |\n    | value 2 | 2-3          |\n\n  @test_case_3\n  Scenario:\n    * a step\n````\n\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'cuke_cataloger'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install cuke_cataloger\n\n## Usage\n\nIn addition to using the provided classes in any regular Ruby script, the gem's functionality can be accessed through the command line or through the provided Rake tasks.\n\n### Command Line\n\n    cuke_cataloger catalog_test_cases [--location=LOCATION] [--prefix=PREFIX][--[no-]row-id] [--id-column-name=ID_COLUMN_NAME]\n\nand\n\n    cuke_cataloger validate_test_cases [--location=LOCATION] [--prefix=PREFIX] [--[no-]row-id] [--id-column-name=ID_COLUMN_NAME] [--file=FILE]\n\n\n### Rake Task\n\nRequire the gem\n\n    require 'cuke_cataloger'\n\nand then call its task creation method in your Rakefile (or wherever you like to keep your Rake tasks) in order to generate the tasks.\n\n    CukeCataloger.create_tasks\n\nIf you want the tasks to be created in a certain namespace, simply call the creation method from within that namespace.\n\n    namespace 'foo' do\n      CukeCataloger.create_tasks\n    end\n\nThis will create tasks that can then be invoked in the usual manner:\n\n    rake tag_tests['path/to/your/tests','@test_case_']\n\nand\n\n    rake validate_tests['path/to/your/tests','@test_case_','validation_results.txt']\n  \n### Adding ids to tests\n\nThe the tagging functionality will add an id tag to every scenario (and an id column to every outline) in a test suite. It can be given a directory in which the tests are located and a prefix upon which to base the tagging scheme but, if not given that information, it will use the current directory and a prefix of `@test_case_`.\n\n    rake tag_tests['path/to/your/tests','@my_prefix_']\n\nThe above example would result in the tags `@my_prefix_1`, `@my_prefix_2`, `@my_prefix_3`, etc. being added to every test in the `tests` directory.\n\n### Validating test ids\n\nThe the validating functionality scans a given directory for any problems related to id tags and generates a report detailing its results. It can be given a directory in which the tests are located and a prefix upon which to base the tagging scheme, as well as a file location to which it should output its report but, if not given that information, it will use the current directory and a prefix of `@test_case_` and it will output the report to the console. \n\n    rake validate_tests['path/to/your/tests','@my_prefix_','validation_results.txt']\n\nThe above example would result in a report called `validation_results.txt` being generated for any test in the `tests` directory that had problems related to their id (e.g. did not have an id tag, had the same id tag as another test, etc.), based up the id prefix `@my_prefix_`.\n\n\n### Shallow cataloging\n\nThe cataloging and validation process can be limited to the test level instead of also checking individual rows in outlines.\n\n`cuke_cataloger catalog_test_cases --no-row-id`\n\n`cuke_cataloger validate_test_cases --no-row-id`\n\n`Rake::Task['tag_tests'].invoke('./features','@test_case_', false)  # 3rd argument is the row flag`\n\n`Rake::Task['validate_tests'].invoke('./features','@test_case_',nil, false)  # 4th argument is the row flag`\n\n\n### Custom id column name\n\nBy default, the cataloging and validation process uses `test_case_id` as the column name for outline rows but an alternative name can be provided.\n\n`cuke_cataloger catalog_test_cases --id-column-name my_special_column_id`\n\n`cuke_cataloger validate_test_cases --id-column-name my_special_column_id`\n\n`Rake::Task['tag_tests'].invoke('./features','@test_case_', true, 'my_special_column_id')  # 4th argument is the id column name`\n\n`Rake::Task['validate_tests'].invoke('./features','@test_case_',nil, true, 'my_special_column_id')  # 5th argument is the id column name`\n\nFor more information and usage examples, see the documentation [here](https://github.com/enkessler/cuke_cataloger/tree/master/testing/cucumber/features).\n\n## Development and Contributing\n\nSee [CONTRIBUTING.md](https://github.com/enkessler/cuke_cataloger/blob/master/CONTRIBUTING.md)\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenkessler%2Fcuke_cataloger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenkessler%2Fcuke_cataloger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenkessler%2Fcuke_cataloger/lists"}