xheal
v2.3.0
Published
AI-powered self-healing test automation with multi-provider LLM support (Google Gemini, OpenAI), BigQuery storage, and cross-framework support (Playwright/TestCafe)
Downloads
94
Maintainers
Readme
🚀 Xheal: AI-Powered Self-Healing for Test Automation
Xheal is an enterprise-grade, universally compatible self-healing library that supercharges your existing test automation pipelines. Say goodbye to flaky tests and constant maintenance. Xheal intelligently repairs broken UI selectors and element interactions on the fly using cutting-edge Generative AI.
🌟 Why Xheal? The Unique Advantage
Unlike traditional self-healing tools that are tied to a single framework or rely on rudimentary DOM diffing, Xheal brings true Agentic AI capabilities directly into your CI/CD pipelines.
1. 🤖 Unrivaled GenAI Integrations
We support the industry's most advanced LLMs out of the box. No vendor lock-in; choose the brain that powers your automation:
- OpenAI (GPT-4/GPT-4o)
- Google Gemini (GenAI)
- Google Vertex AI (Enterprise-grade security)
2. 🔌 Universal Framework Support
Xheal isn't just for one ecosystem. It seamlessly wraps around the tools your team already uses:
- Playwright
- Selenium
- TestCafe
3. 📊 Enterprise Observability & Telemetry
Every healing action is tracked, measured, and stored for complete transparency and compliance.
- BigQuery Storage Integration: Archive thousands of test runs for historical analysis.
- OpenTelemetry Support: Integrate self-healing metrics directly into DataDog, New Relic, or Grafana.
- Rich Reporting: Automatic generation of HTML, JSON, and Markdown reports for deep insights into what healed, why, and how much time was saved.
🚀 Quick Start
Installation
npm install xhealConfiguration
Set up your .env file with your preferred AI provider:
# Choose your provider (openai, gemini, vertexai)
LLM_PROVIDER=openai
# If using OpenAI:
OPENAI_API_KEY=your-api-key
# If using Google Gemini:
GEMINI_API_KEY=your-api-keyBasic Usage Example (Playwright)
import { test, expect } from '@playwright/test';
import { HealingClient } from 'xheal';
const healer = new HealingClient();
test('Example Test with Xheal', async ({ page }) => {
await page.goto('https://your-app.com');
// Traditional way (breaks if ID changes):
// await page.click('#submit-btn-v2');
// With Xheal (Agentic Healing):
await healer.click(page, 'Submit Application Button', '#submit-btn-v2');
});📈 Enterprise Observability & AI Fine-Tuning
Xheal isn't a black box. We provide enterprise-grade observability and unique data-generation capabilities that empower your teams.
Visual OpenTelemetry Integration
When you enable OpenTelemetry with Xheal, you unlock powerful visual dashboards in your preferred monitoring stack (Datadog, Grafana, New Relic). You get a high-level visual matrix of:
- 🟢 Healing Success Rate: Real-time percentage of dynamically healed tests versus failed tests.
- ⏱️ Time Saved: Visual metrics on how many engineering hours were saved by preventing pipeline failures.
- 📊 Token Usage & Latency: Line charts tracking API token consumption and the exact latency of every AI inference call during test execution.
🧠 Generate Training Data for SLMs & LLMs
Every time Xheal successfully heals a test, it generates and logs structured "Healing Data" (Before DOM state -> User Intent -> AI Selected Element). You own this data. Teams can easily export this meticulously labeled dataset to:
- Train custom Small Language Models (SLMs) for faster, cheaper, on-premise test healing.
- Fine-tune larger LLMs to perfectly understand your organization's specific DOM structures, class-naming conventions, and UI frameworks.
🤝 Community & Feedback
Xheal is currently expanding. We would love for the community, engineers, and QA leaders to try out the package and provide feedback.
If you encounter issues or have feature requests, please open an issue on our public repository.
Transform your test flakiness into a competitive advantage with Xheal.
