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

wdio-qase-reporter

v1.3.0

Published

Qase WebDriverIO Reporter

Downloads

19,802

Readme

Qase TestOps WebdriverIO Reporter

License npm downloads

Qase WebdriverIO Reporter enables seamless integration between your WebdriverIO (WDIO) 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
  • Auto-create test cases from your test code
  • Report test results with rich metadata (fields, attachments, steps)
  • Support for parameterized tests
  • Multi-project reporting support
  • Flexible configuration (file, environment variables, wdio.conf.js)
  • Support for both Mocha/Jasmine and Cucumber test frameworks
  • Network Profiler for automatic HTTP request capture

Installation

npm install --save-dev wdio-qase-reporter

Quick Start

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

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

2. Configure reporter in wdio.conf.js:

const WDIOQaseReporter = require('wdio-qase-reporter').default;
const { afterRunHook, beforeRunHook } = require('wdio-qase-reporter');

exports.config = {
  reporters: [[WDIOQaseReporter, {
    disableWebdriverStepsReporting: true,
    disableWebdriverScreenshotsReporting: true,
    useCucumber: false,
  }]],

  // Hooks
  onPrepare: async function() {
    await beforeRunHook();
  },
  onComplete: async function() {
    await afterRunHook();
  },

  // ... other options
};

3. Add Qase ID to your test:

For Mocha/Jasmine:

import { qase } from 'wdio-qase-reporter';

describe('Authentication', () => {
  it(qase(1, 'User can log in'), () => {
    expect(true).to.equal(true);
  });
});

For Cucumber:

Feature: User Authentication

  @QaseId=1
  Scenario: User can log in
    Given I am on the login page
    When I enter valid credentials
    Then I should see the dashboard

4. Run your tests:

QASE_MODE=testops npx wdio run wdio.conf.js

Configuration

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

  1. wdio.conf.js reporter options (WDIO-specific, highest priority)
  2. Environment variables (QASE_*)
  3. 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": "WDIO Automated Run"
    },
    "batch": {
      "size": 100
    }
  },
  "report": {
    "driver": "local",
    "connection": {
      "local": {
        "path": "./build/qase-report",
        "format": "json"
      }
    }
  }
}

WDIO Reporter Options

Configure in wdio.conf.js:

| Option | Type | Default | Description | |--------|------|---------|-------------| | disableWebdriverStepsReporting | boolean | false | Disable automatic step reporting for WebDriver commands | | disableWebdriverScreenshotsReporting | boolean | false | Disable automatic screenshot attachments | | useCucumber | boolean | false | Enable Cucumber integration (set to true if using Cucumber) |

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

Mocha/Jasmine - Single ID:

import { qase } from 'wdio-qase-reporter';

describe('Test Suite', () => {
  it(qase(1, 'Test with single ID'), () => {
    expect(true).to.equal(true);
  });
});

Mocha/Jasmine - Multiple IDs:

it(qase([1, 2, 3], 'Test linked to multiple cases'), () => {
  expect(true).to.equal(true);
});

Cucumber - Tags:

@QaseId=1
Scenario: Single test case

@QaseId=2,3,4
Scenario: Multiple test cases

Add Metadata

Mocha/Jasmine:

import { qase } from 'wdio-qase-reporter';

it('Test with metadata', () => {
  qase.title('Custom test title');
  qase.fields({
    'severity': 'critical',
    'priority': 'high',
    'layer': 'api',
  });
  qase.suite('Authentication\tLogin');

  expect(true).to.equal(true);
});

Cucumber:

@QaseId=1
@Title=Custom Test Title
@Suite=Authentication
Scenario: Login with metadata
  Given I am on the login page

Add Steps

Mocha/Jasmine:

import { qase } from 'wdio-qase-reporter';

it('Test with steps', async () => {
  await qase.step('Navigate to login page', async (step) => {
    await browser.url('/login');
  });

  await qase.step('Enter credentials', async (step) => {
    await step.step('Type email', async () => {
      await $('#email').setValue('[email protected]');
    });

    await step.step('Type password', async () => {
      await $('#password').setValue('password123');
    });
  });

  await qase.step('Submit form', async () => {
    await $('#login-button').click();
  });
});

Cucumber: Cucumber steps are automatically reported as Qase steps.

Attach Files

Mocha/Jasmine:

import { qase } from 'wdio-qase-reporter';

it('Test with attachments', async () => {
  const screenshot = await browser.takeScreenshot();

  qase.attach({
    name: 'screenshot.png',
    content: screenshot,
    type: 'image/png',
  });

  qase.attach({ paths: '/path/to/log.txt' });
});

Cucumber: Use step attachments or configure automatic screenshot capture.

Ignore Tests

Mocha/Jasmine:

it('Ignored test', () => {
  qase.ignore();
  expect(true).to.equal(true);
});

Cucumber: No direct support - use tags to filter tests.

Test Result Statuses

| WDIO Result | Qase Status | |-------------|-------------| | passed | passed | | failed | failed | | skipped | skipped |

For more usage examples, see the Usage Guide.

Running Tests

Basic Execution

# Run all tests
QASE_MODE=testops npx wdio run wdio.conf.js

# Run specific spec file
QASE_MODE=testops npx wdio run wdio.conf.js --spec ./tests/login.spec.js

# Run specific suite
QASE_MODE=testops npx wdio run wdio.conf.js --suite smoke

Cucumber

# Run Cucumber tests
QASE_MODE=testops npx wdio run wdio.conf.js

Environment Variables

# Override configuration
QASE_MODE=testops \
QASE_TESTOPS_PROJECT=DEMO \
QASE_TESTOPS_API_TOKEN=your_token \
npx wdio run wdio.conf.js

Parallel Execution

# Run with max instances
QASE_MODE=testops npx wdio run wdio.conf.js --maxInstances 5

Multi-Project Support

Qase WebdriverIO Reporter supports sending test results to multiple Qase projects simultaneously using qase.projects():

Mocha/Jasmine:

import { qase } from 'wdio-qase-reporter';

it(qase.projects({ PROJ1: [1], PROJ2: [2] }, 'Multi-project test'), () => {
  expect(true).to.equal(true);
});

Configuration:

{
  "mode": "testops",
  "testops": {
    "multiproject": {
      "enabled": true
    }
  }
}

For detailed information, see the Multi-Project Support Guide.

Network Profiler

The Network Profiler automatically captures outgoing HTTP requests made during test execution and reports them as REQUEST-type steps in Qase TestOps.

Additional setup: Register QaseWdioService in your WDIO configuration:

// wdio.conf.js
const { QaseWdioService } = require('wdio-qase-reporter');

exports.config = {
  // ... other config
  services: [[QaseWdioService, {}]],
};

Note: Network profiling works in same-process WDIO configurations (maxInstances: 1).

Enable in qase.config.json:

{
  "profilers": ["network"],
  "networkProfiler": {
    "skip_domains": ["analytics.example.com"],
    "track_on_fail": true
  }
}

| Option | Description | Default | |--------|-------------|---------| | profilers | Array of profilers to enable. Use ["network"] for HTTP capture | [] | | networkProfiler.skip_domains | Domains to exclude from profiling | [] | | networkProfiler.track_on_fail | Capture response body for failed requests (status >= 400) | true |

Requests to qase.io are always excluded automatically.

Requirements

  • Node.js >= 14
  • WebdriverIO >= 8.40.0

Documentation

| Guide | Description | |-------|-------------| | Usage Guide | Complete usage reference with all methods and options | | 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.