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

@qualitywatcher/wdio-service

v1.1.2

Published

WebdriverIO Service for QualityWatcher

Downloads

53

Readme

QualityWatcher Webdriverio Service

Description

This @qualitywatcher/wdio-service works in conjunction with the @qualitywatcher/wdio-reporter

How to Install

$ npm install @qualitywatcher/wdio-service --save-dev

Usage

1. Import @qualitywatcher/wdio-service

import QualityWatcherService from "@qualitywatcher/wdio-service";

2. Configure Options

services: [[QualityWatcherService, {
        email: '[email protected]',
        apiKey: process.env.QUALITYWATCHER_API_KEY,
        testRunName: "Sample Automation results",
        description: 'This is a sample test run from our sample test automation.',
        projectId: 100,
        includeAllCases: true,
        // use more optional options
        report: true,
        includeCaseWithoutId: true,
        complete: false,
        ignoreSkipped: true,
        generateShareableLink: true,
        parentSuiteTitle: "Smoke suite",
        screenshotFolder: "./screenshots",
        uploadScreenshot: true,
    }]],

Full reporter options

| Option | Required | Description | |-----------------------|----------|-------------------------------------------------------| | projectId | Yes | The ID of the project. | | testRunName | Yes | The name of the test run. | | description | Yes | A description of the test run. | | includeAllCases | Yes | Whether to include all test cases from any suite that at least one automated result belongs to in the created run. | | complete | No | If true, marks the test run as complete. | | includeCaseWithoutId | No | Include test cases even if they don't have Suite and Case IDs mapping, this will create new test case/s in QualityWatcher from results. | | report | No | If true, send results to QualityWatcher. | | ignoreSkipped | No | If true, skipped tests will be ignored. | | generateShareableLink | No | If true, generates a shareable link for the report. | | parentSuiteTitle | No | The suite where test cases without IDs will be added. | | screenshotFolder | No | The folder where screenshots are stored. | | uploadScreenshot | No | If true, uploads screenshots with the report. |

3. Get API Key from QualityWatcher

  • Go to your QualityWatcher account
  • Hover over your profile avatar and click "Profile Settings"
  • Select the "API Key" menu item
  • Click the "Generate API Key" button
  • Copy your API Key, we will use this for posting the results

4. Create a .env file in the root of your project and add your API KEY, or update an existing .env

touch .env
echo "QUALITYWATCHER_API_KEY=[API Key]" >> .env

# For windows:
# type NUL > .env
# echo QUALITYWATCHER_API_KEY=[API Key]  > .env

5. Install dotenv and require it in your config file

wdio.conf.{ts|js}

require("dotenv").config();

6. Additional Notes

1. Both mapped and unmapped results can be sent to QualityWatcher

If you don't have any tests in QualityWatcher you can still push your results and create new tests by enabling includeCaseWithoutId in the service options.

OR

If you have existing test cases ensure that your WebdriverIO tests includes the ID of your QualityWatcher test case and suite that it belongs to. Make sure the suite and test case IDs are distinct from your test titles:

// Good:
it("[S12C1234] Can authenticate a valid user", ...
it("Can authenticate a valid user [S12C1234]", ...

// Bad:
it("S12C123Can authenticate a valid user", ...
it("Can authenticate a valid userS5C123", ...
2. Screenshot name requirement when uploading

When saving screenshots, ensure that whitespace/s in the name are replaced with "_", without this QualityWatcher will not be able to find screenshots for uploading. See example below:

afterEach(async function () {
        // Take a screenshot after each test/assertion
        const testName = this.currentTest?.fullTitle().replace(/\s/g, '_');
        const screenshotPath = `./screenshots/${testName}.png`;
        await browser.saveScreenshot(screenshotPath);
    });

email

Type: String (optional)

Email address associated with the account

apiKey

Type: String (required)

Get API Key from QualityWatcher

  • Go to your QualityWatcher account
  • Hover over your profile avatar and click "Profile Settings"
  • Select the "API Key" menu item
  • Click the "Generate API Key" button
  • Copy your API Key, we will use this for posting the results

testRunName

Type: String (required)

Title for the test run

description

Type: String (required)

Description for the test run

projectId

Type: Number (required)

The id for the project that include the tests

includeAllCases

Type: Boolean (required)

whether or not to include all test cases from each test suite used