{"id":16152461,"url":"https://github.com/prashanth-sams/testrail-cucumber","last_synced_at":"2025-07-28T19:40:54.829Z","repository":{"id":34720083,"uuid":"182989836","full_name":"prashanth-sams/testrail-cucumber","owner":"prashanth-sams","description":"Sync cucumber automation test results with your testrail suite","archived":false,"fork":false,"pushed_at":"2022-05-19T10:45:36.000Z","size":20,"stargazers_count":10,"open_issues_count":3,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-02T03:05:36.089Z","etag":null,"topics":["cucumber","ruby","testrail","testrail-api","testrail-cucumber","testrail-reporting","testrailapi"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/testrail-cucumber","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/prashanth-sams.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-23T10:17:44.000Z","updated_at":"2025-05-29T12:22:04.000Z","dependencies_parsed_at":"2022-08-28T11:00:13.794Z","dependency_job_id":null,"html_url":"https://github.com/prashanth-sams/testrail-cucumber","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/prashanth-sams/testrail-cucumber","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prashanth-sams%2Ftestrail-cucumber","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prashanth-sams%2Ftestrail-cucumber/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prashanth-sams%2Ftestrail-cucumber/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prashanth-sams%2Ftestrail-cucumber/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prashanth-sams","download_url":"https://codeload.github.com/prashanth-sams/testrail-cucumber/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prashanth-sams%2Ftestrail-cucumber/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267576656,"owners_count":24110317,"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","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cucumber","ruby","testrail","testrail-api","testrail-cucumber","testrail-reporting","testrailapi"],"created_at":"2024-10-10T01:07:10.355Z","updated_at":"2025-07-28T19:40:54.755Z","avatar_url":"https://github.com/prashanth-sams.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# testrail-cucumber\n[![Gem Version](https://badge.fury.io/rb/testrail-cucumber.svg)](http://badge.fury.io/rb/testrail-cucumber)\n\u003e Sync `cucumber` automation test results with your testrail suite. Discover an example with Cucumber in this gem source.\n\n### Features\n- [x] Update test results in the existing test run\n- [x] Create dynamic test run and update test results in it\n- [x] Update multi-testrail cases's status from a single automation scenario\n- [x] Delete/clean all the existing test runs in a project's suite before test run \n- [x] Skip specific test-runs from deletion, when `clean_testrun` is set `true`\n- [x] Disable `testrail-rspec` execution on-demand\n- [x] Support for environment variables to pass testrail config values\n\n## Installation\nAdd this line to your application's Gemfile:\n```ruby\ngem 'testrail-cucumber'\n```\n\nAnd then execute:\n```bash\n$ bundle\n```\n\nOr install it yourself as:\n```bash\n$ gem install testrail-cucumber\n```\n\n**Import the library in your `env.rb` file**\n```\nrequire 'testrail-cucumber'\n```\n\n## Usage\n\n#### Update one or multiple case(s) at a time\nPrefix testrail case id(s) on start of your cucumber scenario or scenario outline; say, `C860`\n```\n  @your_tag\n  Scenario: C860 Verify the home page\n    Given I navigate to \"home\" page\n    Then I verify the home page\n      \n  Scenario: C860 C862 C863 Verify the home page\n    Given I navigate to \"home\" page\n    Then I verify the home page\n  \n  Scenario Outline: C853 Verify Google search\n    And I search for \u003ckeyword\u003e\n    Then I verify \u003cresult\u003e in the search result page\n\n    Examples:\n      | keyword | result     |\n      | Jesus   | Jesus      |\n      | Bible   | My saviour |\n```\n\n#### Configuration\n\n1. Create a config file, `testrail_config.yml` in the project's parent folder\n2. Enter the testrail details based on demand\n3. To execute tests against the existing `Test Run`,\n    ```yaml\n    testrail:\n      url: https://your_url.testrail.io/\n      user: your@email.com\n      password: ******\n      run_id: 111\n    ```\n    Here, `run_id` is the dynamically generated id from your testrail account (say, `run_id: 111`)\n\n4. To create a dynamic `Test Run` and to update results,\n    ```yaml\n    testrail:\n      url: https://your_url.testrail.io/\n      user: your@email.com\n      password: ******\n      project_id: 10\n      suite_id: 110\n    ```\n    Here, `project_id` and `suite_id` are the dynamically generated id from your testrail account; `run_id` is optional in this case.\n\n5. To delete all test-runs before execution,\n    ```yaml\n    testrail:\n      url: https://your_url.testrail.io/\n      user: your@email.com\n      password: ******\n      clean_testrun: true\n      project_id: 10\n      suite_id: 110\n    ```\n    Set, `clean_testrun: false` if you don't want to clean the existing test runs; but this keyword is optional.\n\n6. Skip specific test-runs from deletion: set `clean_testrun: true` \u0026 `skip_testrun_ids: value, ...`\n    ```yaml\n    testrail:\n      url: https://your_url.testrail.io/\n      user: your@email.com\n      password: ******\n      clean_testrun: true\n      skip_testrun_ids: 473, 475\n      project_id: 10\n      suite_id: 110\n    ```\n    Here, `skip_testrun_ids: value` is optional.\n\n7. Disable `testrail-rspec` execution: set `allow: yes` \n    ```yaml\n    testrail:\n      url: https://your_url.testrail.io/\n      user: your@email.com\n      password: ******\n      run_id: 111\n      allow: no\n    ```\n    Here, `allow: yes` is optional. \n\n8. Use Environment variables to pass testrail config values \n    ```yaml\n    testrail:\n      url: ENV['URL']\n      user: ENV['TESTRAIL_USER']\n      password: ENV['TESTRAIL_PASSWORD']\n      run_id: ENV['RUN_ID']\n      clean_testrun: false\n      project_id: 10\n      suite_id: 110\n    ```\n    Example, `rake ./demo_spec.rb TESTRAIL_USER=your@email.com TESTRAIL_PASSWORD=****** RUN_ID=564 URL=https://your_url.testrail.io/` \n\n#### Hooks\n\nUpdate the results through `Hooks` on end of each test\n```\nAfter do |scenario|\n  TestrailCucumber::UpdateTestRails.new(scenario).upload_result\nend\n```\n\n#### Is there any demo available for this gem?\nYes, you can use this `cucumber` demo as an example, https://github.com/prashanth-sams/testrail-cucumber/features\n```\nrake test\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprashanth-sams%2Ftestrail-cucumber","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprashanth-sams%2Ftestrail-cucumber","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprashanth-sams%2Ftestrail-cucumber/lists"}