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

@qestro/self-healing

v0.1.0

Published

AI-powered self-healing selectors for Playwright tests. Auto-fix broken tests when your UI changes.

Readme

@qestro/self-healing

AI-powered self-healing selectors for Playwright tests. Auto-fix broken tests when your UI changes.

npm version license: MIT

When your UI ships, selectors break. @qestro/self-healing inspects a failed test run and proposes ranked fixes — new selectors, longer waits, assertion rewrites, API schema migrations — with a confidence score you can auto-apply above a threshold you set.

Zero runtime dependencies. Works with any test framework that can map its result shape into TestResult.

Install

npm install @qestro/self-healing
# Playwright is an optional peer (only needed for the reporter example)
npm install --save-dev playwright

60-second example

import { SelfHealingEngine } from '@qestro/self-healing';

const engine = new SelfHealingEngine();
const result = await engine.analyzeAndHeal(testId, failedTestResult);

if (result.healed) {
  // confidence >= 0.85 by default — apply `result.appliedFix.suggestedValue`
  applyFix(result.appliedFix);
} else {
  // inspect `result.suggestions` for ranked alternatives
  console.log(result.suggestions);
}

What it fixes

| Failure type | Healer | Typical fix | | -------------------- | ------------------ | ------------------------------------------------------ | | selector_changed | SelectorHealer | Swap stale selector for [data-testid] / ARIA / text | | timing_issue | TimingHealer | Add waitForSelector, bump timeout, retry on flake | | assertion_drift | AssertionHealer | Update expected value, swap .toBe.toContain | | api_schema_change | APIHealer | Patch field paths, error shape, status range checks |

Each healer returns multiple ranked suggestions (confidence: 0..1). The engine picks the best one and auto-applies it if its confidence clears the threshold.

Options

new SelfHealingEngine({
  autoApplyThreshold: 0.9,        // default 0.85
  logger: console,                // anything with info/warn/error
  onLowConfidence: async ({ testId, suggestion, confidence }) => {
    // Route below-threshold cases to a review queue, Slack, GitHub PR, etc.
  },
});

Playwright reporter

Drop the self-healing engine into your Playwright config:

// playwright.config.ts
export default {
  reporter: [['@qestro/self-healing/dist/examples/playwright-integration.js']],
};

See examples/playwright-integration.ts for the full reporter — maps Playwright's TestResult into the engine's input shape and forwards low-confidence cases to a notifier.

Public API

import {
  SelfHealingEngine,
  SelectorHealer,
  TimingHealer,
  AssertionHealer,
  APIHealer,
} from '@qestro/self-healing';

import type {
  TestResult,
  AssertionResult,
  HealingResult,
  HealingSuggestion,
  FailureAnalysis,
  FailureType,
  SelfHealingEngineOptions,
  Logger,
  LowConfidenceNotifier,
} from '@qestro/self-healing';

You can also use the healers independently:

import { SelectorHealer } from '@qestro/self-healing';

const suggestions = new SelectorHealer().heal(myFailedTestResult);

TestResult shape

interface TestResult {
  id: string;
  testId: string;
  status: 'passed' | 'failed' | 'pending' | 'skipped';
  startTime: Date;
  endTime: Date;
  duration: number;
  errors: string[];            // stringified error messages
  assertions: AssertionResult[];
  screenshots?: string[];
  logs?: string[];
}

Map your test runner's output into this shape once and you're done.

Confidence scoring

| Confidence | Meaning | | ---------- | -------------------------------------------------------- | | >= 0.90 | Safe to auto-apply in CI without human review | | 0.80–0.89| Auto-apply with PR comment / changelog entry | | 0.60–0.79| Send to human review queue (default onLowConfidence) | | < 0.60 | Surface as informational suggestion only |

Tune autoApplyThreshold to match your team's risk tolerance.

Made by Qestro

This package is one of the healers that powers qestro.app — the copilot for testing AI vibe coding.

Qestro is a managed platform that adds team collaboration, CI/CD integration, cross-browser runs, mobile testing, visual regression, and test generation from plain English. Paste a URL, describe what to test in plain English, and get production-ready test cases across browser, mobile, and API.

Try Qestro free at qestro.app.

Contributing

Found a healing strategy that should ship in the OSS core? PRs welcome at github.com/finsavvyai/qestro.

License

MIT. See LICENSE.