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

@betabridge/ai-testing-agent

v1.0.0

Published

AI-powered testing agent for frontend, backend, Logic Apps, and Function Apps using MCP

Readme

🤖 AI Testing Agent

npm version License: MIT

AI-powered testing agent for frontend, backend, Logic Apps, and Function Apps using Model Context Protocol (MCP). Automate your testing workflows with intelligent test generation and execution.

✨ Features

  • 🎯 Multi-Platform Testing: Frontend UI, Backend APIs, Azure Logic Apps, and Function Apps
  • 🤖 AI-Powered: Generate test cases from natural language descriptions
  • 🔧 MCP Integration: Built on Model Context Protocol for extensibility
  • ⚡ Parallel Execution: Run multiple tests simultaneously
  • 📊 Rich Reporting: Detailed test results with screenshots and logs
  • 🛠️ CLI & Programmatic: Use via command line or import in your code
  • 🎨 TypeScript Support: Full type definitions included

🚀 Quick Start

Installation

# Install globally for CLI usage
npm install -g @ai-testing/agent

# Or install locally in your project
npm install @ai-testing/agent

CLI Usage

# Create a test case template
ai-testing-agent create "Login Test" --type frontend --output login-test.json

# Run test cases
ai-testing-agent run test-cases.json --parallel --headless

# Validate test cases
ai-testing-agent validate test-cases.json

# Start MCP server
ai-testing-agent server --port 8080

Programmatic Usage

import { TestOrchestrator, TestCase } from '@ai-testing/agent';

const orchestrator = new TestOrchestrator();

const testCase: TestCase = {
  id: 'login-test',
  name: 'User Login Test',
  description: 'Test user login functionality',
  type: 'frontend',
  targetUrl: 'https://example.com',
  steps: [
    { action: 'navigate', url: 'https://example.com/login' },
    { action: 'type', selector: '#email', value: '[email protected]' },
    { action: 'type', selector: '#password', value: 'password123' },
    { action: 'click', selector: '#login-button' }
  ],
  expectedResults: [
    'User should be redirected to dashboard',
    'Welcome message should be displayed'
  ]
};

// Run the test
const result = await orchestrator.runTest(testCase);
console.log(`Test ${result.status}: ${result.duration}ms`);

📋 Test Types

Frontend Testing

Automated browser testing using Playwright:

const frontendTest: TestCase = {
  type: 'frontend',
  targetUrl: 'https://myapp.com',
  steps: [
    { action: 'navigate', url: 'https://myapp.com' },
    { action: 'click', selector: '.login-button' },
    { action: 'type', selector: '#email', value: '[email protected]' },
    { action: 'assert', selector: '.success-message', expected: 'Login successful' }
  ]
};

Backend API Testing

REST API testing with Axios:

const backendTest: TestCase = {
  type: 'backend',
  targetUrl: 'https://api.example.com',
  steps: [
    { action: 'api-call', endpoint: '/auth/login', method: 'POST', payload: { email: '[email protected]', password: 'password' } },
    { action: 'assert', expected: { status: 200, data: { token: 'string' } } }
  ]
};

Azure Logic App Testing

Test Azure Logic App workflows:

const logicAppTest: TestCase = {
  type: 'logic-app',
  steps: [
    { action: 'trigger', endpoint: 'https://your-logic-app.azurewebsites.net/api/trigger' },
    { action: 'assert', expected: { status: 'Succeeded' } }
  ]
};

Azure Function App Testing

Test Azure Functions:

const functionAppTest: TestCase = {
  type: 'function-app',
  steps: [
    { action: 'trigger', endpoint: 'https://your-function-app.azurewebsites.net/api/process' },
    { action: 'assert', expected: { status: 200 } }
  ]
};

🔧 Configuration

Test Configuration

import { TestRunner } from '@ai-testing/agent';

const runner = new TestRunner({
  headless: true,           // Run browser in headless mode
  timeout: 30000,          // Test timeout in milliseconds
  parallel: true,          // Run tests in parallel
  maxConcurrency: 5,       // Maximum concurrent tests
  screenshotOnFailure: true, // Take screenshots on failure
  outputDir: './test-results' // Output directory for results
});

Azure Configuration

import { LogicAppTestingEngine, FunctionAppTestingEngine } from '@ai-testing/agent';

// Configure Azure credentials
const logicAppEngine = new LogicAppTestingEngine();
logicAppEngine.setAzureCredentials(
  'your-subscription-id',
  'your-resource-group',
  'your-access-token'
);

const functionAppEngine = new FunctionAppTestingEngine();
functionAppEngine.setFunctionAppCredentials(
  'https://your-function-app.azurewebsites.net',
  'your-function-key'
);

📊 Test Results

Test results include comprehensive information:

interface TestResult {
  testId: string;
  status: 'running' | 'passed' | 'failed' | 'error';
  steps: StepResult[];
  screenshot?: string | Buffer;
  logs: string[];
  duration: number;
  error?: string;
  startTime?: number;
  endTime?: number;
}

🛠️ Development

Building the Package

# Build the package
npm run build:package

# Test the build
npm run pack

# Publish to npm
npm run publish:public

Project Structure

src/
├── index.ts              # Main exports
├── cli/
│   └── index.ts          # CLI implementation
├── mcp/
│   ├── client.ts         # MCP client
│   └── server.ts         # MCP server
├── testing/
│   ├── test-orchestrator.ts
│   ├── frontend-engine.ts
│   ├── backend-engine.ts
│   ├── logic-app-engine.ts
│   └── function-app-engine.ts
├── runner/
│   └── test-runner.ts    # Test runner
├── types.ts              # TypeScript definitions
└── utils/
    └── test-helpers.ts   # Utility functions

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

📞 Support


Made with ❤️ by the AI Testing Agent Team