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

cucumberjs-qase-reporter

v0.2.10

Published

Qase TMS CucumberJS Reporter

Downloads

143

Readme

Qase TMS Cucumber JS reporter

Publish results simple and easy.

How to integrate

npm install cucumberjs-qase-reporter

Example of usage

The Cucumber JS reporter has the ability to auto-generate test cases and suites from your test data.

But if necessary, you can independently register the ID of already existing test cases from TMS before the executing tests. You can decorate your scenarios with Qase TMS case IDs in format Q-<case id> or Q123, also q can be in any case:

Feature: Cucumber documentation
    As a user of cucumber.js
    I want to have documentation on cucumber
    So I can write better applications

    @sections @Q-2
    Scenario: Usage documentation
        Given I am on the cucumber.js GitHub repository
        When I go to the README file
        Then I should see a "Cool" section
        When I go to the README file

    @ignore @q4
    Scenario: Status badges 2
        Given I am on the cucumber.js GitHub repository
        When I go to the README file
        Then I should see a "Build Status" badge
        And I should see a "Dependencies" badge

To run tests and create a test run, execute the command (for example from folder examples):

cucumber-js -f cucumberjs-qase-reporter --format-options='{\"qaseConfig\": \"./.qaserc\"}' features -r examples/zombie/support -r examples/zombie/steps

or

npm test

A test run will be performed and available at:

https://app.qase.io/run/QASE_PROJECT_CODE

Configuration

Qase reporter supports passing parameters using two ways: using .qaserc file and using ENV variables.

.qaserc parameters:

  • enabled - Enable reporter
  • basePath - URL Qase.io
  • environmentId - To execute with the sending of the envinroment information
  • apiToken - Token for API access, you can find more information here
  • projectCode - Code of your project (can be extracted from main page of your project: https://app.qase.io/project/DEMOTR - DEMOTR is project code here)
  • runId - Pass Run ID
  • runName - Set custom Run name, when new run is created. Supported parameters:
    • %DATE%
  • runDescription - Set custom Run description, when new run is created
  • logging - Enabled debug logging from reporter or not
  • rootSuiteTitle - A parent suite for your autocreated tests

Example configuration file:

{
  "enabled": true,
  "logging": true,
  "apiToken": "api_key",
  "projectCode": "project_code",
  "runName": "CucumberJS run %DATE%",
  "environmentId": 1,
  "basePath": "https://api.qase.io/v1"
}

Supported ENV variables:

  • QASE_ENABLED - Same as enabled
  • QASE_API_BASE_URL - Same as basePath
  • QASE_API_TOKEN - Same as apiToken
  • QASE_PROJECT - Same as projectCode
  • QASE_RUN_ID - Pass Run ID from ENV and override reporter options
  • QASE_RUN_NAME - Same as runName
  • QASE_RUN_DESCRIPTION - Same as runDescription
  • QASE_ENVIRONMENT_ID - Same as environmentId
  • QASE_LOGGING - Same as logging
  • QASE_ROOT_SUITE_TITLE - Same as rootSuiteTitle

To run using ENV you have to execute:

cucumber-js -f cucumberjs-qase-reporter features

Setup with Protractor

Due to different configurations of protractor and cucumber itself you should install a bit more libraries:

npm install cucumberjs-qase-reporter @cucumber/cucumber @cucumber/messages

After that you will be able to use reporter like this (protractor.conf.js):

exports.config = {
  ...
  cucumberOpts: {
    require: [
      './tests/e2e/specs/*.js',
    ],  // require step definition files before executing features
    tags: [],
    'dry-run': false,
    compiler: [],  
    format: ["node_modules/cucumberjs-qase-reporter"],
  },
  ...
}

Do not forget to add .qaserc file!

Requirements

We maintain the reporter on LTS versions of Node. You can find the current versions by following the link