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 🙏

© 2026 – Pkg Stats / Ryan Hefner

newman-reporter-qase

v2.3.0

Published

Qase TMS Newman Reporter

Downloads

2,638

Readme

Qase TestOps Newman Reporter

License npm downloads

Qase Newman Reporter enables seamless integration between your Newman/Postman collection tests and Qase TestOps, providing automatic test result reporting, test case management, and comprehensive test analytics.

Features

  • Link automated tests to Qase test cases by ID using special comments
  • Auto-create test cases from your Postman test scripts
  • Report test results with parameterized data
  • Multi-project reporting support
  • Flexible configuration (file, environment variables)

Note: Newman integration is unique - tests are defined in Postman collections, and Qase IDs are specified via special comments in test scripts, not via programmatic API imports.

Installation

npm install --save-dev newman-reporter-qase

Quick Start

1. Create qase.config.json in your project root:

{
  "mode": "testops",
  "testops": {
    "project": "YOUR_PROJECT_CODE",
    "api": {
      "token": "YOUR_API_TOKEN"
    }
  }
}

2. Add Qase ID to your Postman test using special comments:

In your Postman collection test script:

// qase: 1
pm.test('Response status is 200', function() {
  pm.response.to.have.status(200);
});

3. Run your Newman tests with Qase reporter:

QASE_MODE=testops newman run ./collection.json -r qase

Configuration

The reporter is configured via (in order of priority):

  1. Environment variables (QASE_*)
  2. Config file (qase.config.json)

Minimal Configuration

| Option | Environment Variable | Description | |--------|---------------------|-------------| | mode | QASE_MODE | Set to testops to enable reporting | | testops.project | QASE_TESTOPS_PROJECT | Your Qase project code | | testops.api.token | QASE_TESTOPS_API_TOKEN | Your Qase API token |

Example qase.config.json

{
  "mode": "testops",
  "fallback": "report",
  "testops": {
    "project": "YOUR_PROJECT_CODE",
    "api": {
      "token": "YOUR_API_TOKEN"
    },
    "run": {
      "title": "Newman Automated Run"
    },
    "batch": {
      "size": 100
    }
  },
  "report": {
    "driver": "local",
    "connection": {
      "local": {
        "path": "./build/qase-report",
        "format": "json"
      }
    }
  }
}

Full configuration reference: See qase-javascript-commons for all available options including logging, status mapping, execution plans, and more.

Usage

Link Tests with Test Cases

Associate your Postman tests with Qase test cases using special comments in your test scripts:

Single ID:

// qase: 10
pm.test('Response is successful', function() {
  pm.response.to.be.info;
});

Multiple IDs:

// Qase: 1, 2, 3
pm.test('Verify user data', function() {
  pm.expect(pm.response.json()).to.have.property('user');
});

Alternative formats:

// qase: 4 5 6 14
pm.test('Check multiple conditions', function() {
  pm.response.to.have.status(200);
});

Important: The comment must be on the line immediately before the pm.test() call.

Add Parameters

Newman supports parameterized tests when using data files. Specify which parameters to report using special comments:

// qase.parameters: userId, user.name
pm.test('User ID is correct', function() {
  var jsonData = pm.response.json();
  pm.expect(jsonData.userId).to.eql(pm.iterationData.get('userid'));
});

You can also specify parameters at the collection or folder level:

{
  "item": [{
    "name": "Folder Name",
    "event": [{
      "listen": "test",
      "script": {
        "exec": [
          "// qase.parameters: userId, user.name"
        ]
      }
    }]
  }]
}

Auto-collect All Parameters

To automatically report all parameters from data files without specifying them:

{
  "framework": {
    "newman": {
      "autoCollectParams": true
    }
  }
}

Ignore Tests

Newman does not support ignoring individual tests. All tests in the collection will be executed and reported (unless filtered by Newman's own mechanisms like --folder flag).

Test Result Statuses

| Newman Result | Qase Status | |---------------|-------------| | Passed | passed | | Failed | failed | | Skipped | skipped |

For more usage examples, see the Usage Guide.

Running Tests

Basic Execution with CLI

# Run with Qase reporter
QASE_MODE=testops newman run ./collection.json -r qase

# Run with multiple reporters
QASE_MODE=testops newman run ./collection.json -r cli,qase

# Run specific folder
QASE_MODE=testops newman run ./collection.json -r qase --folder "API Tests"

Using Data Files

# Run with JSON data file
newman run ./collection.json -r qase -d ./data.json

# Run with CSV data file
newman run ./collection.json -r qase -d ./users.csv

Using Environment Variables

# Set environment variables
newman run ./collection.json -r qase -e ./environment.json

# Override config with environment variables
QASE_MODE=testops \
QASE_TESTOPS_PROJECT=DEMO \
QASE_TESTOPS_API_TOKEN=your_token \
newman run ./collection.json -r qase

Programmatic Usage

const newman = require('newman');

newman.run({
  collection: require('./collection.json'),
  reporters: ['qase'],
  reporter: {
    qase: {
      // Reporter options can be passed here
      // But prefer using qase.config.json for consistency
    }
  }
}, function(err) {
  if (err) { throw err; }
  console.log('Collection run complete');
});

Requirements

  • Node.js >= 14
  • Newman >= 5.3.0

Documentation

| Guide | Description | |-------|-------------| | Usage Guide | Complete usage reference with parameters and examples | | Attachments | Adding screenshots, logs, and files to test results | | Steps | Defining test steps for detailed reporting | | Multi-Project Support | Reporting to multiple Qase projects | | Upgrade Guide | Migration guide for breaking changes | | Configuration Reference | Full configuration options |

Examples

See the examples directory for complete working examples.

License

Apache License 2.0. See LICENSE for details.