@haitham90/jamie-ai-test-service
v1.0.1
Published
π€ Jamie AI Testing Agent - Automatically configure and generate intelligent tests for any repository structure
Downloads
6
Maintainers
Readme
π€ Jamie AI Testing Agent
Automatically configure and generate intelligent tests for any repository structure
Jamie is a revolutionary AI-powered testing agent that seamlessly integrates with your existing projects, whether they're single applications or complex monorepos. With zero-configuration setup and intelligent framework detection, Jamie gets your testing infrastructure up and running in minutes.
β¨ Why Jamie?
- π Zero-Config Setup - Detects your framework and configures everything automatically
- π§ AI-Powered - Generates intelligent tests from user stories and code analysis
- ποΈ Universal - Works with single apps, monorepos, React, Vue, Angular, Svelte, and more
- β‘ Smart Detection - Automatically discovers your project structure and dependencies
- π― Comprehensive - E2E, component, API, and visual testing in one tool
- π Analytics - Built-in dashboard with AI insights and recommendations
π Quick Start
For Single App Repositories (Most Common)
# 1. Install Jamie globally or as dev dependency
npm install -g @jamie/testing-agent
# OR
npm install --save-dev @jamie/testing-agent
# 2. Initialize Jamie in your project
cd your-awesome-app
jamie init
# 3. Follow the interactive setup (30 seconds!)
# Jamie will:
# β
Detect your framework (React, Vue, Angular, etc.)
# β
Configure Cypress for E2E and component testing
# β
Generate example tests
# β
Set up CI/CD workflows
# 4. Start testing!
jamie test --watchFor Monorepos
# 1. Install Jamie in your monorepo root
npm install --save-dev @jamie/testing-agent
# 2. Initialize with monorepo detection
jamie init --monorepo
# Jamie will automatically:
# β
Discover all your applications
# β
Configure each app independently
# β
Create workspace-level test orchestration
# β
Generate per-app and cross-app tests
# 3. Run tests across all apps
jamie test --allπ― Supported Frameworks & Tools
| Framework | Single App | Monorepo | Component Tests | E2E Tests | |-----------|------------|----------|-----------------|-----------| | βοΈ React | β | β | β | β | | βοΈ Next.js | β | β | β | β | | π Vue.js | β | β | β | β | | π Nuxt | β | β | β | β | | π °οΈ Angular | β | β | β | β | | πΆ Svelte | β | β | β | β | | πΆ SvelteKit | β | β | β | β | | π§ Node.js APIs | β | β | β | β |
Build Tools: Vite, Webpack, Create React App, Angular CLI, and more
Package Managers: npm, yarn, pnpm
CI/CD: GitHub Actions, GitLab CI, Azure DevOps, Jenkins
π Complete Usage Guide
Installation Options
π³ Docker (Recommended)
# Pull the latest image
docker pull ghcr.io/tajawal/jamie-ai-test-service:latest
# Initialize your project
docker run --rm -v $(pwd):/workspace -w /workspace \
ghcr.io/tajawal/jamie-ai-test-service:latest jamie init
# Generate intelligent tests
docker run --rm -v $(pwd):/workspace -w /workspace \
ghcr.io/tajawal/jamie-ai-test-service:latest jamie generate --intelligentπ¦ npm Installation
# Global installation (recommended for CLI usage)
npm install -g git+https://github.com/tajawal/Jamie.git
# Project-specific installation
npm install --save-dev git+https://github.com/tajawal/Jamie.git
yarn add --dev @jamie/testing-agent
# Using pnpm
pnpm add -g @jamie/testing-agent
pnpm add -D @jamie/testing-agentCLI Commands
jamie init - Project Initialization
# Interactive setup (recommended)
jamie init
# Skip prompts with sensible defaults
jamie init --yes
# Specify framework manually
jamie init --framework react
# Configure specific test types
jamie init --test-types e2e,component,api
# Set up for monorepo
jamie init --monorepo
# Include CI/CD setup
jamie init --cicd --providers github,gitlabjamie test - Run Tests
# Run all tests
jamie test
# Watch mode for development
jamie test --watch
# Run specific test type
jamie test --type e2e
jamie test --type component
# Run tests for specific app (monorepo)
jamie test --app my-frontend-app
# Run in headed mode (see browser)
jamie test --headed
# Generate tests before running
jamie test --generatejamie generate - AI Test Generation
# Generate from user story
jamie generate --story "As a user, I want to login to access my dashboard"
# Generate from URL analysis
jamie generate --url https://your-app.com
# Generate component tests
jamie generate --component src/components/LoginForm.jsx
# Specify output location
jamie generate --story "User registration flow" --output cypress/e2e/auth/jamie dashboard - Web Dashboard
# Start dashboard (auto-opens browser)
jamie dashboard
# Custom port
jamie dashboard --port 4000
# Don't open browser
jamie dashboard --no-browserFramework-Specific Examples
React/Next.js Projects
# For Create React App
cd my-react-app
jamie init --framework react
# Jamie automatically detects CRA and configures accordingly
# For Next.js
cd my-nextjs-app
jamie init
# Auto-detects Next.js, sets up both E2E and component testing
# Generate component tests
jamie generate --component src/components/Header.tsxVue/Nuxt Projects
# Vue 3 with Vite
cd my-vue-app
jamie init --framework vue
# Configures Vite-based component testing
# Nuxt application
cd my-nuxt-app
jamie init
# Sets up server-side and client-side testingMonorepo Examples
# Nx Monorepo
cd my-nx-workspace
jamie init --monorepo
# Detects Nx structure, configures all apps and libs
# Custom Structure
my-monorepo/
βββ frontend/ # React app
βββ admin-panel/ # Vue app
βββ api/ # Node.js API
βββ mobile-app/ # React Native
jamie init --monorepo
# Jamie discovers and configures all apps automatically!π§ What Jamie Creates
Jamie generates these files in your project:
your-project/
βββ jamie.config.json # Main configuration
βββ .jamierc # CLI settings
βββ cypress.config.js # Cypress configuration
βββ cypress/
β βββ e2e/
β β βββ app.cy.js # Generated E2E tests
β βββ support/
β βββ commands.js # Custom commands
β βββ e2e.js # E2E setup
β βββ component.js # Component setup
βββ .github/workflows/ # CI/CD (optional)
βββ jamie-tests.ymlPackage.json Scripts (Auto-Added)
{
"scripts": {
"test:e2e": "cypress run",
"test:e2e:open": "cypress open",
"test:component": "cypress run --component",
"test:component:open": "cypress open --component",
"jamie:generate": "jamie generate",
"jamie:dashboard": "jamie dashboard"
}
}π¨ Generated Test Examples
E2E Test Example
// cypress/e2e/app.cy.js (generated by Jamie)
describe('Application E2E Tests', () => {
beforeEach(() => {
cy.visit('/');
});
it('should load the application successfully', () => {
cy.get('body').should('be.visible');
// Add specific assertions for your app
});
it('should be responsive', () => {
cy.viewport('iphone-6');
cy.get('body').should('be.visible');
cy.viewport(1280, 720);
cy.get('body').should('be.visible');
});
});Component Test Example
// src/App.cy.jsx (generated by Jamie)
describe('App Component Tests', () => {
it('should render without crashing', () => {
cy.mount('<div>Hello App!</div>');
cy.get('#cypress-root').should('contain', 'Hello App!');
});
it('should be accessible', () => {
cy.mount('<button>Click me</button>');
cy.get('button').should('be.visible');
cy.get('button').should('not.have.attr', 'aria-hidden', 'true');
});
});π CI/CD Integration
Jamie automatically generates CI/CD workflows:
GitHub Actions (Auto-Generated)
# .github/workflows/jamie-tests.yml
name: Jamie Tests
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run Jamie tests
run: jamie testπ Jamie Dashboard
Access the web dashboard at http://localhost:3001 to:
- π View test analytics and trends
- π€ Get AI-powered insights and recommendations
- π Analyze code coverage and quality metrics
- β‘ Monitor test performance across apps
- π― Generate tests from user stories visually
- π§ Configure settings through UI
π οΈ Troubleshooting
Common Issues
"Command not found: jamie"
# If installed locally, use npx
npx jamie init
# Or install globally
npm install -g @jamie/testing-agent"No package.json found"
# Make sure you're in a valid Node.js project
npm init -y
jamie init"Framework not detected"
# Specify manually
jamie init --framework reactDebug Mode
# Enable verbose logging
DEBUG=jamie:* jamie init
DEBUG=jamie:* jamie testReset Configuration
# Reset all Jamie configuration
jamie configure --reset
# Or manually delete config files
rm jamie.config.json .jamierc cypress.config.jsπ§ Configuration
AI Provider Setup
# Set up OpenAI (default)
echo "OPENAI_API_KEY=your_openai_key" >> .env
# Use Claude instead
jamie configure --provider claude
echo "ANTHROPIC_API_KEY=your_claude_key" >> .envCustom Configuration
// jamie.config.json
{
"version": "1.0.0",
"type": "single-app",
"apps": [
{
"name": "my-app",
"framework": "react",
"testTypes": ["e2e", "component"]
}
],
"settings": {
"aiProvider": "openai",
"dashboard": { "port": 3001 }
}
}π Commands Reference
# Initialization
jamie init # Interactive setup
jamie init --monorepo # Monorepo setup
jamie init --yes # Skip prompts
# Testing
jamie test # Run all tests
jamie test --watch # Watch mode
jamie test --type e2e # Specific test type
jamie test --app frontend # Specific app (monorepo)
# AI Generation
jamie generate --story "..." # Generate from user story
jamie generate --component src/Button.jsx
# Management
jamie dashboard # Open web dashboard
jamie configure # Interactive configuration
jamie status # Show current status
jamie update # Update Jamieπ€ Contributing
We welcome contributions! Please see our Contributing Guide for details.
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Support
- π Documentation
- π¬ Discord Community
- π Report Issues
- π§ Email Support
