npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cucumber-testrail

v0.0.1

Published

Pushes Cucumber Results from CircleCI to TestRails

Downloads

11

Readme

Cucumber TestRail

Portal for Displaying Cucumber Results from CircleCI on TestRail!

Setup

Preconditions

Setup on TestRail

  1. Create New Project and enter project overview. The last number in the resulting url is your project_id

  2. Navigate to Test Cases tab

  3. Generate a new section and add test cases for your suite

  4. Navigate to Test Runs & Results tab

  5. Click on Add Test Plan Button

  6. Give your test plan a name and click Add Test Plan. The last number in the resulting url is your testplan_id

Setup on CircleCI

  1. Enable CircleCI builds for your repository

  2. Add your username and password as environment variables in the CircleCI dashboard's project settings

Setup on Your Project

  1. Add a cucumber_testrail.yml file to your root directory containing the following information:
testrail_url: "https://yourtestrailurlhere.testrail.net/index.php?"

suites:

  - suite:
      project_id: [your project_id]
      project_symbol: 'SYM'
      suite_id: (optional) 1
      section_id: (optional) [your section_id (not exposed on the UI but is sequential so starts with 1)]
      testplan_id: [your testplan_id]

In this configuration, you will have one suite. Tags with the SYM symbol in your cucumber tags will correlate with this TestRail suite.

  1. In your project source, add the following circle.yml file:
machine:
  node:
    version: 6.1.0

test:

  pre:
    # create a new folder in circle's artifacts directory for our cucumber results
    - mkdir -p $CIRCLE_TEST_REPORTS/cucumber

  override:
    # run the cucumber tests and publish the json format to circle's artifacts
    - cucumber-js --format json:$CIRCLE_TEST_REPORTS/cucumber/tests.cucumber --format pretty

  post:
    - ./bin/publish_results

Check out the FAQs page about configuring nightly test runs.

  1. Add bin/publish or any subsitute that will define when the builds should publish results to testrail:
./node_modules/.bin/cucumber-testrail -c cucumber_testrail.yml -r $CIRCLE_TEST_REPORTS/cucumber/tests.cucumber -u $TESTRAIL_USERNAME -p $TESTRAIL_PASSWORD -i '[SOME MESSAGE]'

Here, [SOME MESSAGE] could denote an environment or and action. You can remove that option if you don't need it.

  1. Write Cucumber Tests with proper TestRail tags! In order to add feature tests that correlate with the above sample suite, add the following tag to the top of your scenario:
  @TestRail-SYM-1
  Scenario: Logging in to the Application

In this example, this scenario maps to case_id 1 from your SYM test suite

  1. Merge tests and watch the update!

FAQs

See our Frequently Asked Questions page for other important information before you get started.