{"id":20047169,"url":"https://github.com/wesovilabs/gherkinize","last_synced_at":"2025-05-05T10:31:15.399Z","repository":{"id":70939441,"uuid":"84526536","full_name":"wesovilabs/gherkinize","owner":"wesovilabs","description":"An executable tool to write better gherkin scenarios","archived":false,"fork":false,"pushed_at":"2017-03-14T18:31:04.000Z","size":6661,"stargazers_count":6,"open_issues_count":5,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T21:15:43.527Z","etag":null,"topics":["bdd","executable","gherkin","golang","testing","validator"],"latest_commit_sha":null,"homepage":"","language":"Go","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/wesovilabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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":"2017-03-10T06:21:54.000Z","updated_at":"2018-11-12T10:05:52.000Z","dependencies_parsed_at":"2024-06-20T17:29:56.221Z","dependency_job_id":"5f053883-1f66-44d0-ab18-bb466d3fb48d","html_url":"https://github.com/wesovilabs/gherkinize","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wesovilabs%2Fgherkinize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wesovilabs%2Fgherkinize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wesovilabs%2Fgherkinize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wesovilabs%2Fgherkinize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wesovilabs","download_url":"https://codeload.github.com/wesovilabs/gherkinize/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252480422,"owners_count":21754774,"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":["bdd","executable","gherkin","golang","testing","validator"],"created_at":"2024-11-13T11:34:15.268Z","updated_at":"2025-05-05T10:31:14.219Z","avatar_url":"https://github.com/wesovilabs.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gherkinize\n\nA command line tool that will help us to write better Gherkin scenarios.\n\n\n## Purpose\n\nThe purpose of this project is mainly helping people to write **Gherkin scenarios** correctly.\n\n\n## Getting Started\n\n\n### Installing with Brew\n\n```\nbrew tap wesovilabs/gherkinize\nbrew install gherkinize\n```\n\nOnce the software is installed we can make use of it.\n\n**gherkinize --help / gherkinize -h**\n\nIt displays the menu.\n\n![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/helpmenu.png \"Gherkinize help\")\n\n**gherkinize --version / gherkinize -v**\n\nIt displays the current software version.\n\n![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/versionmenu.png \"Gherkinize version\")\n\n**gherkinize --input [scenarios_dir] --config [gherkin-rules.toml] validate**\n\nIt validates our scenarios. Both arguments **input** and **config** are required.\n\n- input: it must point to a directory that contains the scenarios to be validated. (So far it only supports directories path)\n- config:  it is a **toml** configuration file path that must look like below. You can download [this](https://github.com/wesovilabs/gherkinize/blob/master/config/gherkin-rules.toml) and\nmodify the values at your convenience.\n\n### Running as a Docker container\n\nIn case of you prefer run **gherkinize** with a Docker container you can do it by running the below command\n```\n    docker run \\\n    -v \u003cPATH_TO_SCENARIOS_DIR\u003e:/var/gherkinize/scenarios \\\n    -v \u003cPATH_TO_DIRECTORY_WITH_RULES_CONFIGURATION_FILE_TOML\u003e:/var/gherkinize/config \\\n    -it wesovilabs/gherkinize \\\n    /app/dist/gherkinize -i /var/gherkinize/scenarios  -c /var/gherkinize/config/\u003cRULES_CONFIGURATION_FILE_TOML\u003e validate\n```\n\nFor example:\n```\n    docker run \\\n    -v /Users/Ivan/Sandbox/WesoviLabs/GO_WORKSPACE/src/github.com/wesovilabs/gherkinize/testdata/scenarios/:/var/gherkinize/scenarios \\\n    -v /Users/Ivan/Sandbox/WesoviLabs/GO_WORKSPACE/src/github.com/wesovilabs/gherkinize/config/:/var/gherkinize/config \\\n    -it wesovilabs/gherkinize \\\n    /app/dist/gherkinize -i /var/gherkinize/scenarios  -c /var/gherkinize/config/gherkin-rules.toml validate\n```\n\n## Gherkin rules configuration file\n\n![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/config.png \"Gherkin Rules Validator\")\n\n**max_steps_per_scenario**: It determines the maximum number of steps per scenario. Many steps could make our scenarios not easy-to-read\n\n**max_len_step**: Max len for steps. Steps with long text are usually hard to understand.\n\n**empty_feature**: Set false if you don't want to allow empty features without scenarios.\n\n**empty_scenario**: Set false if you don't want to allow empty scenarios without steps.\n\n**strict**: This checks the below conditions:\n\n* The first step must be GIVEN\n\n* The keyword GIVEN can be only used once.\n\n* WHEN can only be used after GIVEN statements\n\n* THEN statement can only be used after WHEN statements\n\n\n## Samples\n\nAssuming you make use of default configuration file and have a directory with somce sceanarios.\n\nFor example, if you checkout this repository and run the below command:\n\n    gherkinize -i testdata/scenarios/ -c config/gherkin-rules.toml  validate\n\nthe output will be the following:\n\n### scenarioA.feature\n![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/scenarioa.png \"Scenario A\")\n\nThe output will be:\n\n![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/scenarioA_result.png \"Scenario A Result\")\n\n### scenarioB.feature\n![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/scenarioB.png \"Scenario B\")\n\nThe output will be:\n\n![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/scenarioB_result.png \"Scenario B Result\")\n\n### scenarioC.feature\n![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/scenarioC.png \"Scenario B\")\n\nThe output will be:\n\n![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/scenarioC_result.png \"Scenario B Result\")\n\n### scenarioD.feature\n![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/scenarioD.png \"Scenario B\")\n\nThe output will be:\n\n![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/scenarioD_result.png \"Scenario B Result\")\n\n### scenarioE.feature\n![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/scenarioE.png \"Scenario B\")\n\nThe output will be:\n\n![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/scenarioE_result.png \"Scenario B Result\")\n\n### scenarioF.feature\n![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/scenarioF.png \"Scenario B\")\n\nThe output will be:\n\n![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/scenarioF_result.png \"Scenario B Result\")\n\n## scenarioG.feature\n![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/scenarioG.png \"Scenario B\")\n\nThe output will be:\n\n![alt text](https://github.com/wesovilabs/gherkinize/blob/master/doc/scenarioG_result.png \"Scenario B Result\")\n\n## The code\n\nThis project is completely developed in **Go**. Please don't hate me so much if the code contains bad practices since I am just learning about Go coding **;-)**\n\n### Understanding the project\n\nIf you wanna run the project locally I invite you to **[fork this repository](https://github.com/wesovilabs/gherkinize)** and check it out.\n\n#### Makefile\n\nYou will find a **Makefile** in the project root.\n\n* **make clean**: Remove compiled files.\n\n* **make test**: Run the tests  (there's no tests yet... so Sorry!!!)\n\n* **make gherkinize**: Build the runnable file.\n\n* **make install**: Install locally.\n\n\n## Built With\n\n* [Go](https://golang.org/) - The go programming language\n\n## Contributing\n\nPlease read [CONTRIBUTING.md](https://github.com/wesovilabs/gherkinize/blob/master/CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.\n\n## Versioning\n\nWe use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/wesovilabs/gherkinize/tags).\n\n## Authors\n\n* **Iván Corrales Solera** - [Wesovilabs](http://www.wesovilabs.com)\n\nSee also the list of [contributors](https://github.com/wesovilabs/gherkinize/contributors) who participated in this project.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwesovilabs%2Fgherkinize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwesovilabs%2Fgherkinize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwesovilabs%2Fgherkinize/lists"}