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

@qutecoder/qa-intel

v0.0.2

Published

Agentic QA test runner for Gherkin, Playwright, JSON diagnostics, and SQLite history

Readme

QA Intel

QA Intel (@qutecoder/qa-intel) is a portable QA intelligence layer for agentic engineering. It turns human- or LLM-authored acceptance flows into structured contracts that another agent, CI job, or test harness can execute, validate, inspect, and reason about.

The aim is not only to run Playwright. The project gives agents a shared validation surface:

  • strict Gherkin input that compiles to suite.json
  • semantic locators instead of brittle raw selectors
  • JSON-only command output for agent-to-agent handoff
  • browser execution with UI, API, network, trace, console, screenshot, and DOM diagnostics
  • failure summaries and fix hints that point toward frontend, backend, or test issues
  • optional SQLite persistence so an agent can query prior runs and dig deeper

Why It Exists

Modern coding agents can generate code quickly, but they need a reliable way to check whether a user journey still behaves correctly. QA Intel provides that feedback loop in a format agents can consume without scraping terminal output.

One agent can generate or update a .feature file. Another can compile and run it. A third can inspect JSON, screenshots, console logs, network calls, trace IDs, and SQLite history before deciding whether the issue is UI, API, business logic, or the test itself.

How It Works

Gherkin feature
  -> strict compiler
  -> suite.json with structured locators
  -> Playwright browser/API execution
  -> JSON result + screenshots + network/console logs
  -> optional SQLite history for later investigation

The core idea is semantic-first targeting:

When I type "[email protected]" into the field "Email"
And I click the button "Log in"
Then I should see the heading "Dashboard"

When a UI has no stable semantic target, use an explicit escape hatch:

When I click testid:login-submit
When I click css:[data-state='ready']

Agent-Facing Guarantees

The CLI is designed for machine consumption:

  • stdout is JSON, with no ANSI formatting
  • failures are structured by layer: ui, api, or business
  • runs include stable runId and traceId values
  • step results include status, duration, target references, screenshots, and typed failure details
  • assertion results include expected/actual data where available
  • non-fatal persistence warnings go to stderr instead of corrupting JSON stdout

The package also exports tool-style functions for agent workflows:

import {
  runSuiteTool,
  executeContractTool,
  executeStepTool,
  validateUIAssertionTool,
  validateAPIResponseTool,
  getStepArtifactsTool,
  ResultStore,
} from "@qutecoder/qa-intel";

These functions return { ok, data, error } shapes so agents can pass validation results to each other without needing to infer state from prose.

Usage

Install from npm:

npm install -D @qutecoder/qa-intel

Compile a feature file:

npx qa-runner compile examples/login.feature --base-url http://localhost:3002

Run a compiled suite:

npx qa-runner run .qa-results/compile/suite.json --base-url http://localhost:3002

Compile and run in one command:

npx qa-runner examples/login.feature --base-url http://localhost:3002

Useful flags:

| Flag | Description | |------|-------------| | --base-url <url> | Base URL for relative navigation and API requests | | --headed | Show the browser | | --fail-fast | Stop after the first failing contract | | --artifact-dir <dir> | Screenshot/artifact output directory | | --results-db <path> | SQLite results database path, default .qa-results/results.db | | --auto-heal | Enable experimental LLM locator healing |

Gherkin Syntax

UI steps:

Given I navigate to "/login"
When I click the button "Log in"
When I type "secret" into the field "Password"
When I select "Admin" in the field "Role"
When I wait for the heading "Dashboard"

UI assertions:

Then I should see the heading "Dashboard"
Then I should not see the alert "Invalid credentials"
Then the text "Welcome back" should exist
Then the heading "Dashboard" should contain text "Dash"

API steps and assertions:

When I POST "/api/auth/login" with body '{"email":"[email protected]","password":"secret"}'
Then the API response to "/api/auth/login" should have status 200
Then the API response to "/api/auth/login" field "user.email" should equal "[email protected]"
Then requests to "/api/auth/login" should include trace ID

Locator Model

Compiled suites use structured locators:

type LocatorSpec =
  | { strategy: "role"; role: string; name: string }
  | { strategy: "label"; name: string }
  | { strategy: "placeholder"; text: string }
  | { strategy: "text"; text: string }
  | { strategy: "testid"; id: string }
  | { strategy: "css"; selector: string };

The runtime resolves those through Playwright:

| Strategy | Playwright call | |----------|-----------------| | role | page.getByRole(role, { name }) | | label | page.getByLabel(name, { exact: true }) | | placeholder | page.getByPlaceholder(text) | | text | page.getByText(text) | | testid | page.getByTestId(id) | | css | page.locator(selector) |

Output And Diagnostics

All CLI output is JSON. A passing run looks like:

{
  "ok": true,
  "data": {
    "runId": "uuid",
    "traceId": "uuid",
    "status": "passed",
    "summary": {
      "totalContracts": 1,
      "passed": 1,
      "failed": 0
    },
    "contracts": []
  }
}

Failures include step/assertion context, screenshot paths, layer classification, and fix hints. During execution, QA Intel captures browser console messages, uncaught page errors, filtered network traffic, request/response bodies when available, and trace headers for API assertions.

SQLite Investigation

CLI runs persist history to .qa-results/results.db by default. Pass --results-db <path> to choose another database:

npx qa-runner examples/login.feature \
  --base-url http://localhost:3002 \
  --results-db .qa-results/results.db

The SQLite store is intended for agents that need to ask follow-up questions after a run:

  • What was the latest failed run?
  • Which step failed first?
  • What network calls happened around a failing assertion?
  • What console or page errors appeared during a step?
  • Did a previous run fail in the same layer with the same target?

Programmatic access is available through ResultStore:

import { ResultStore } from "@qutecoder/qa-intel";

const store = new ResultStore(".qa-results/results.db");
const latest = store.getLatestRun();

if (latest) {
  const network = store.getRunNetworkLogs(latest.runId);
  const consoleLogs = store.getRunConsoleLogs(latest.runId);
}

store.close();

The database uses normalized tables for runs, contracts, steps, assertions, network logs, network headers, and console logs, so agents can also query it directly with SQL.

Auto-Healing

Auto-healing is experimental and disabled by default. Enable it with --auto-heal and configure an OPENAI_API_KEY.

When a locator-based action fails after normal retries, the healer receives the failed structured locator, accessibility tree, screenshot, and error message. It must return a validated LocatorSpec; invalid suggestions are dropped and the original deterministic failure is preserved.

Docs

| Doc | Purpose | |-----|---------| | docs/agent-workflows.md | Agent-to-agent validation loops and SQLite investigation | | docs/using-in-real-projects.md | How teams use the package in apps, CI, and agent workflows | | docs/cli.md | CLI commands, flags, JSON output, and exit codes | | docs/gherkin.md | Supported strict Gherkin syntax | | docs/dsl.md | Compiled suite.json and LocatorSpec reference | | docs/configuration.md | CLI, environment, programmatic, artifact, and SQLite configuration |

Contributing

Contributions are welcome. Start with CONTRIBUTING.md for setup, testing, docs expectations, and release notes. Please also read CODE_OF_CONDUCT.md and SECURITY.md before reporting sensitive issues.

License

Licensed under the Apache License 2.0. This keeps the project permissive for commercial and internal use while preserving attribution and Apache-2.0's patent grant/termination terms.

Development

yarn install
yarn build
yarn typecheck
yarn test

Keywords

qa-intel, qa, quality-assurance, testing, test-automation, test-runner, automation, playwright, browser-automation, ui-testing, api-testing, gherkin, gherkin-tests, cucumber, bdd, bdd-testing, e2e, end-to-end, acceptance-tests, acceptance-testing, ai, ai-agents, agentic, agentic-testing, llm, llm-testing, validation, test-diagnostics, structured-output, sqlite, ci, cli