Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI-Native Test Automation Framework

An intelligent test automation framework with AI-powered test generation, auto-healing capabilities, and failure pattern detection.

Features

  • 🤖 AI Test Generation: Automatically generate test cases using AI based on natural language descriptions
  • 🔧 Auto-Healing: Intelligent test repair that fixes brittle tests automatically
  • 📊 Pattern Detection: Identify and analyze common failure patterns across your test suite
  • 🎯 Multi-Framework Support: Works with Cypress, Playwright, Puppeteer, and Selenium
  • 📈 Advanced Analytics: Comprehensive test analytics and insights
  • 🔄 Retry Mechanisms: Smart retry logic with auto-healing on failure

Installation

npm install ai-native-test-framework

Quick Start

import { TestFramework } from 'ai-native-test-framework';

const framework = new TestFramework({
  apiKey: process.env.OPENAI_API_KEY,
  enableAutoHealing: true,
  enablePatternDetection: true,
});

// Generate test cases using AI
const testCases = await framework.generateTestCases(
  'Test user login flow with email and password',
  'cypress',
  5
);

// Run tests
const results = await Promise.all(
  testCases.map(tc => framework.runTest(tc.id))
);

// Get analytics
const analytics = framework.getAnalytics();
console.log(analytics);

Architecture

Core Components

  • TestFramework: Main orchestrator for test execution
  • AITestGenerator: Generates test cases using AI
  • TestHealer: Auto-heals failing tests
  • PatternDetector: Detects and analyzes failure patterns

Test Types Supported

  • UI/E2E tests
  • API tests
  • Integration tests
  • Unit tests (with adaptation)

API Reference

TestFramework

generateTestCases(description, framework, count)

Generates AI-powered test cases from natural language description.

runTest(testId)

Executes a single test with auto-healing and retry logic.

runAllTests()

Executes all registered test cases.

getAnalytics()

Returns comprehensive test analytics and failure patterns.

AITestGenerator

generateTests(description, framework, count)

Generates test cases based on description.

generateFromPattern(existingTests, count)

Generates new tests by learning from existing patterns.

TestHealer

healTest(testCase, result)

Attempts to repair a failing test automatically.

PatternDetector

detectPatterns(results)

Analyzes test results and detects common failure patterns.

Configuration

interface TestConfig {
  apiKey?: string;              // OpenAI API key
  maxRetries?: number;          // Max retry attempts (default: 3)
  timeout?: number;             // Test timeout in ms (default: 30000)
  enableAutoHealing?: boolean;   // Enable auto-healing (default: true)
  enablePatternDetection?: boolean; // Enable pattern detection (default: true)
}

Building & Development

# Install dependencies
npm install

# Build
npm run build

# Run tests
npm test

# Watch mode
npm run dev

Use Cases for QA Leaders

  1. Reduce Maintenance Overhead: Auto-healing reduces the time spent fixing brittle tests
  2. Faster Test Development: AI-generated tests accelerate test suite creation
  3. Data-Driven Insights: Pattern detection reveals systemic quality issues
  4. Team Productivity: Less time on test maintenance, more time on strategy
  5. Quality Metrics: Advanced analytics for executive reporting

Roadmap

  • Integration with CI/CD pipelines
  • ML-based test optimization
  • Visual regression testing with AI
  • Cross-browser testing coordination
  • Performance profiling integration
  • Cloud-based distributed testing
  • Mobile app testing support

Contributing

Contributions welcome! This is an open-source framework built for QA teams.

License

MIT

Author

Ashwin Kulkarni - Creator and Maintainer

Support

For issues, questions, or feature requests, please visit our GitHub repository.


Built for QA Leaders • Enabling the next generation of intelligent testing

About

An AI-native test automation framework that generates, runs, and self-heals end-to-end tests across Cypress, Playwright, Puppeteer, and Selenium. Includes AI test generation, smart auto-healing, failure pattern detection, scheduling, reporting, and performance monitoring to reduce maintenance and accelerate QA workflows.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages