
Product
Microsoft Teams Notifications Are Now Available in Socket
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.
@qestro/self-healing
Advanced tools
AI-powered self-healing selectors for Playwright tests. Auto-fix broken tests when your UI changes.
AI-powered self-healing selectors for Playwright tests. Auto-fix broken tests when your UI changes.
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.
npm install @qestro/self-healing
# Playwright is an optional peer (only needed for the reporter example)
npm install --save-dev playwright
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);
}
| 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.
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.
},
});
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.
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);
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 | 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.
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.
Found a healing strategy that should ship in the OSS core? PRs welcome at github.com/finsavvyai/qestro.
MIT. See LICENSE.
FAQs
AI-powered self-healing selectors for Playwright tests. Auto-fix broken tests when your UI changes.
We found that @qestro/self-healing demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Product
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.

Security News
pnpm 12 rewrites the package manager in Rust, cutting install times by up to 90% while preserving pnpm 11 workflows and lockfiles.

Security News
Socket CTO Ahmad Nassri joins AppSec leaders at Black Hat to discuss active malware, package manager risks, and software supply chain defense.