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

playwright-qatouch

v1.1.1

Published

Playwright reporter that auto-creates test cases, test runs, and uploads results to QA Touch — no TR codes required.

Readme

playwright-qatouch

A Playwright reporter that automatically syncs test cases, creates test runs, and uploads results to QA Touchno TR codes required.

Features

  • Full sync mode — auto-creates QA Touch modules from your describe() blocks, creates missing test cases, and builds test runs
  • Title-based matching — no need to put TR0123 codes in your test names
  • Auto-creates test runs with milestone and assignment
  • Error details & screenshots — failed tests upload the error message and screenshot attachments to QA Touch
  • Uploads results (Passed / Failed / Blocked / Untested) after the run
  • Generalized run grouping — create separate QA Touch runs by browser, Playwright project, role, or test-data tags
  • Zero config files — everything goes in playwright.config.ts

Installation

npm install --save-dev playwright-qatouch

Usage

Add the reporter to your playwright.config.ts:

import { defineConfig } from "@playwright/test";

export default defineConfig({
  reporter: [
    ["html"],
    [
      "playwright-qatouch",
      {
        domain: process.env.QATOUCH_DOMAIN,
        apiToken: process.env.QATOUCH_API_TOKEN,
        projectKey: process.env.QATOUCH_PROJECT_KEY,
        assignTo: process.env.QATOUCH_ASSIGN_TO,
        // sync defaults to true — modules are created from describe() blocks
      },
    ],
  ],
});

That's it. When you run npx playwright test, the reporter will:

  1. Resolve modules from your describe() blocks (or use a fixed testsuiteId)
  2. Fetch existing test cases, create any missing ones
  3. Create a new test run under the specified milestone
  4. Collect all test results (including error messages and screenshots for failures)
  5. Upload failed tests individually with details, then bulk-upload the rest

Configuration Options

| Option | Required | Default | Description | | --------------- | ------------------------- | ------------------------- | -------------------------------------------------- | | domain | Yes | — | Your QA Touch domain (subdomain) | | apiToken | Yes | — | QA Touch API token | | projectKey | Yes | — | QA Touch project key | | testsuiteId | Yes (unless sync: true) | — | Module/testsuite key to push results into | | assignTo | Yes | — | User key to assign the test run to | | sync | No | true | Full sync: auto-create modules & cases from suites | | milestoneName | No | "Playwright Automation" | Release/milestone name (reuses or creates) | | milestoneKey | No | — | Existing milestone key (skips name lookup) | | createCases | No | true | Auto-create missing test cases | | createTestRun | No | true | Auto-create a test run | | tag | No | "playwright" | Tag applied to the created test run | | splitRunsBy | No | [] | Split QA Touch runs by project, browser, or tag:<name> |

Sync mode vs. fixed module

| Mode | Config | Behaviour | | ------------------ | -------------------------------- | --------------------------------------------------------------------------------------------------------- | | Sync (default) | sync: true, no testsuiteId | Reads describe() block names, matches or creates QA Touch modules, creates missing cases in each module | | Fixed module | sync: false, set testsuiteId | All tests are pushed into the single specified module — no modules are created |

Example: Full sync (recommended)

// playwright.config.ts
export default defineConfig({
  reporter: [
    [
      "playwright-qatouch",
      {
        domain: process.env.QATOUCH_DOMAIN,
        apiToken: process.env.QATOUCH_API_TOKEN,
        projectKey: process.env.QATOUCH_PROJECT_KEY,
        assignTo: process.env.QATOUCH_ASSIGN_TO,
        // sync defaults to true — modules are created from describe() names
      },
    ],
  ],
});

Example: Fixed module

// playwright.config.ts
export default defineConfig({
  reporter: [
    [
      "playwright-qatouch",
      {
        domain: process.env.QATOUCH_DOMAIN,
        apiToken: process.env.QATOUCH_API_TOKEN,
        projectKey: process.env.QATOUCH_PROJECT_KEY,
        testsuiteId: process.env.QATOUCH_TESTSUITE_ID,
        assignTo: process.env.QATOUCH_ASSIGN_TO,
        sync: false,
      },
    ],
  ],
});

Example: Generalized execution context

Use splitRunsBy when the same logical test case runs under multiple execution contexts and you want separate QA Touch runs instead of one merged result.

export default defineConfig({
  reporter: [
    [
      "playwright-qatouch",
      {
        domain: process.env.QATOUCH_DOMAIN,
        apiToken: process.env.QATOUCH_API_TOKEN,
        projectKey: process.env.QATOUCH_PROJECT_KEY,
        assignTo: process.env.QATOUCH_ASSIGN_TO,
        splitRunsBy: ["browser", "tag:role", "tag:data"],
      },
    ],
  ],
});

Then add execution metadata to the test title:

test("should create order @role=admin @data=us", async ({ page }) => {
  // ...
});

This keeps the QA Touch case title stable as should create order, while the reporter creates distinct QA Touch runs such as:

  • Playwright Run ... [browser=chromium, role=admin, data=us]
  • Playwright Run ... [browser=firefox, role=admin, data=us]

Supported splitRunsBy values:

  • project — split by Playwright project name
  • browser — split by inferred browser name from the Playwright project
  • tag:<name> — split by title metadata such as @role=admin or @data=us

Error Details & Screenshots

When a test fails, the reporter automatically captures:

  • Error message — exception name, message, and the first 5 stack frames
  • Screenshot — from Playwright's built-in screenshot attachments

To get screenshots on failure, enable them in your Playwright config:

export default defineConfig({
  use: {
    screenshot: "only-on-failure",
  },
});

The error message and screenshot are uploaded to QA Touch as a comment on the failed test result.

CI/CD (GitHub Actions)

- name: Run Playwright tests
  run: npx playwright test
  env:
    QATOUCH_DOMAIN: ${{ secrets.QATOUCH_DOMAIN }}
    QATOUCH_API_TOKEN: ${{ secrets.QATOUCH_API_TOKEN }}
    QATOUCH_PROJECT_KEY: ${{ secrets.QATOUCH_PROJECT_KEY }}
    QATOUCH_ASSIGN_TO: ${{ secrets.QATOUCH_ASSIGN_TO }}

Set sync: false and add testsuiteId in your config if you want to target a fixed module instead of auto-creating from describe() names.

Status Mapping

| Playwright | QA Touch | | ----------- | ------------ | | passed | Passed (1) | | failed | Failed (5) | | timedOut | Failed (5) | | interrupted | Blocked (3) | | skipped | Untested (2) |

When splitRunsBy is empty, repeated executions of the same test title are merged and the worst status wins (failed > blocked > passed > untested).

When splitRunsBy is set, each group gets its own QA Touch test run, so browser-, role-, or data-specific outcomes stay separate.

How It Works

  1. onBegin — Resolves modules (sync mode) or loads existing cases (fixed module), creates missing test cases, creates a test run
  2. onTestEnd — Collects each test result and assigns it to a run group based on splitRunsBy (failures also capture error message and screenshot path)
  3. onEnd — Creates one QA Touch run per group, uploads failed tests individually with error details/screenshots, then bulk-uploads the rest

License

ISC