Transform API testing with specialized AI agents that generate, execute, and analyze comprehensive test suites automatically.
Sentinel is an enterprise-grade, AI-powered platform that automates the entire API testing lifecycle using specialized agents for functional, security, and performance testing. Built with a modern microservices architecture and hybrid Python/Rust implementation for optimal performance.
π Table of Contents
- β¨ Features
- π Quick Start
- π Documentation
- ποΈ Architecture
- π€ AI Agents
- π» Usage
- π§ͺ Testing
- π οΈ Development
- π€ Contributing
- π License
- π Support
β¨ Features
π― Intelligent Test Generation
- AI-Powered Agents: 7 specialized agents for functional, security, and performance testing
- Multi-LLM Support: Anthropic Claude, OpenAI GPT-4, Google Gemini, Mistral, and local Ollama models
- Specification-Driven: Automatic test generation from OpenAPI/Swagger specifications
- Hybrid Architecture: Python + Rust with intelligent routing based on real-time performance metrics
π Comprehensive Testing
- Functional Testing: Positive, negative, and stateful workflow testing
- Security Testing: BOLA, injection attacks (SQL/NoSQL/Command/LLM), authorization testing
- Performance Testing: Load, stress, and spike testing with k6/JMeter/Locust
- 540+ Tests: 97.8% pass rate with comprehensive coverage
π¨ Modern User Interface
- React Dashboard: Real-time metrics and interactive test management
- Specification Management: Upload, parse, and manage OpenAPI specs
- Test Execution: One-click test runs with detailed results
- Analytics: Trend analysis and comprehensive reporting
β‘ Enterprise-Ready
- Microservices Architecture: 10 independent, scalable services
- Docker Deployment: Complete containerization with Docker Compose
- Observability: Prometheus metrics, Jaeger tracing, structured logging
- RBAC: Role-based access control with JWT authentication
π Quick Start
Get Sentinel running in under 5 minutes:
Prerequisites
- Docker and Docker Compose (required)
- Git (required)
- Make (optional, for convenience commands)
- Python 3.10+ (only for local development)
- Node.js 14+ (only for frontend development)
Installation
-
Clone the repository
git clone https://github.com/proffesor-for-testing/sentinel-api-testing.git cd sentinel-api-testing -
Configure LLM provider (optional but recommended for AI features)
# Set your API key for AI-powered test generation export SENTINEL_APP_ANTHROPIC_API_KEY="your-anthropic-api-key" # Or use the configuration script for other providers cd sentinel_backend/scripts ./switch_llm.sh claude # Claude (default) ./switch_llm.sh openai # OpenAI GPT-4 ./switch_llm.sh gemini # Google Gemini ./switch_llm.sh local # Local Ollama
-
Start the platform
# Complete setup with one command make setup # Or manually with Docker Compose docker-compose up --build -d make init-db
-
Access the platform
- π Frontend: http://localhost:3000
- π Login:
admin@sentinel.com/admin123 - π API Docs: http://localhost:8000/docs
- π§ͺ Test API: http://localhost:8080 (Petstore demo)
Verify Installation
# Check all services are running make status # View service logs make logs # Run health checks curl http://localhost:3000/health curl http://localhost:8000/health
That's it! You now have a fully functional AI-powered API testing platform running locally.
π Documentation
π Getting Started
- Quick Start Guide - Detailed setup instructions
- User Guide - Complete platform usage guide
- FAQ - Common questions and solutions
ποΈ Technical Documentation
- Architecture Overview - System design and components
- API Reference - REST API documentation
- Database Schema - Data model design
- Hybrid Python/Rust Architecture - Performance details
π Deployment & Operations
- Deployment Guide - Production deployment
- Docker Guide - Container orchestration
- Troubleshooting - Common issues and solutions
- Observability - Metrics and tracing
π€ AI Agents
- Agent Specifications - Detailed agent capabilities
- Rust Agents - High-performance implementations
- LLM Configuration - Multi-provider setup
ποΈ Architecture
Sentinel uses a modern microservices architecture with 10 independent services:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Frontend (React + nginx) β
β http://localhost:3000 β
ββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββ
β API Gateway (FastAPI) β
β http://localhost:8000 β
βββββββ¬βββββββββ¬βββββββββ¬βββββββββ¬βββββββββ¬βββββββββββββββββββ
β β β β β
βββββββΌβββββ ββΌβββββββ ββΌβββββββ ββΌββββββ ββΌβββββββββββββββββ
β Auth β β Spec β β Orch. β β Exec.β β Data Service β
β Service β βServiceβ βServiceβ βServiceβ β (Analytics) β
β :8005 β β :8001 β β :8002 β β :8003β β :8004 β
ββββββββββββ βββββββββ βββββ¬ββββ ββββββββ βββββββββββββββββββ
β
ββββββββββΌβββββββββ
β Rust Core β
β (ruv-swarm) β
β :8088 β
ββββββββββ¬βββββββββ
β
ββββββββββββββββββββΌβββββββββββββββββββ
β β β
ββββββΌββββββ βββββββΌβββββββ βββββββΌβββββββ
βPostgreSQLβ β RabbitMQ β β Prometheus β
β +vector β β :5672 β β :9090 β
β :5432 β ββββββββββββββ ββββββββββββββ
ββββββββββββ
Core Services
| Service | Port | Description |
|---|---|---|
| Frontend | 3000 | React UI with Redux state management |
| API Gateway | 8000 | Single entry point with RBAC |
| Auth Service | 8005 | JWT authentication and user management |
| Spec Service | 8001 | OpenAPI specification management |
| Orchestration | 8002 | AI agent coordination and workflows |
| Execution Service | 8003 | Test execution engine |
| Data Service | 8004 | Data persistence and analytics |
| Rust Core | 8088 | High-performance agent execution |
| PostgreSQL | 5432 | Database with pgvector for AI |
| RabbitMQ | 5672 | Asynchronous message broker |
π€ AI Agents
Sentinel employs 7 specialized AI agents with both Python and Rust implementations:
Functional Testing Agents
- π’ Functional-Positive-Agent: Valid "happy path" test generation with schema-based data
- π΄ Functional-Negative-Agent: Boundary value analysis and creative negative testing
- π Functional-Stateful-Agent: Complex multi-step workflows with dependency graphs
Security Testing Agents
- π Security-Auth-Agent: BOLA, authorization bypass, authentication vulnerabilities
- π Security-Injection-Agent: SQL/NoSQL/Command/LLM injection attack testing
Performance Testing Agents
- β‘ Performance-Planner-Agent: Load, stress, spike testing with k6/JMeter/Locust scripts
Data Generation Agents
- π Data-Mocking-Agent: Intelligent, schema-aware test data generation
Performance
| Implementation | Language | Performance | Use Case |
|---|---|---|---|
| Python Agents | Python | Optimized | General testing, LLM integration |
| Rust Agents | Rust | Alternative | Experimental high-volume scenarios |
Intelligent Routing: System selects optimal implementation based on real-time performance metrics. Benchmark testing shows Python and Rust implementations have comparable performance with different strengths - Python excels at LLM-integrated workflows while Rust provides consistent performance for high-volume generation.
Performance Note: Early claims of "18-21x" Rust performance advantage have been revised after comprehensive benchmarking. Actual performance varies by workload - see docs/BENCHMARK_RESULTS.md for detailed metrics.
π» Usage
1οΈβ£ Upload API Specification
# Via UI: Navigate to Specifications β Upload # Or via API: curl -X POST http://localhost:8000/api/v1/specifications \ -H "Authorization: Bearer YOUR_JWT_TOKEN" \ -F "file=@petstore.yaml"
2οΈβ£ Generate Tests with AI
# Via UI: Click "Generate Tests" β Select agents # Or via API: curl -X POST http://localhost:8000/api/v1/test-generation \ -H "Authorization: Bearer YOUR_JWT_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "specification_id": "spec-123", "agents": ["functional-positive", "security-auth"], "options": { "max_tests_per_agent": 50, "use_rust": true } }'
3οΈβ£ Execute Test Suites
# Via UI: Test Suites β Click "Run" # Or via API: curl -X POST http://localhost:8000/api/v1/test-runs \ -H "Authorization: Bearer YOUR_JWT_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "test_suite_id": "suite-456", "target_environment": "http://api.example.com" }'
4οΈβ£ View Results & Analytics
- Dashboard: Real-time metrics at http://localhost:3000/dashboard
- Test Runs: Detailed results at http://localhost:3000/test-runs
- Analytics: Trend analysis at http://localhost:3000/analytics
Example Workflow
# 1. Start the platform make setup # 2. Login to the UI # Visit http://localhost:3000 # Login: admin@sentinel.com / admin123 # 3. Upload Petstore specification # Navigate to Specifications β Upload β Choose petstore.yaml # 4. Generate tests with multiple agents # Click "Generate Tests" β Select all agents β Generate # 5. Create test suite # Navigate to Test Cases β Select tests β "Create Suite" # 6. Run tests # Navigate to Test Suites β Select suite β "Run Tests" # Target: http://localhost:8080 (Petstore API) # 7. View results # Navigate to Test Runs β Click latest run β View detailed results
π§ͺ Testing
Sentinel includes 540+ comprehensive tests with 97.8% pass rate:
Run All Tests
# Recommended: Run tests in Docker for consistency cd sentinel_backend ./run_tests.sh -d # Run specific test categories ./run_tests.sh -d -t unit # Unit tests (456 tests) ./run_tests.sh -d -t integration # Integration tests (20 tests) ./run_tests.sh -d -t e2e # End-to-end tests (30 tests) ./run_tests.sh -d -t agents # AI agent tests (184 tests)
Test Coverage
| Category | Tests | Coverage | Status |
|---|---|---|---|
| AI Agents | 184 | 100% | β Complete |
| LLM Providers | 272 | 100% | β Complete |
| Unit Tests | 456 | 84% | β Complete |
| Integration | 20 | 4% | β Complete |
| Backend E2E | 30 | 6% | β Complete |
| Frontend E2E | 45+ | 8% | β Complete |
| Total | 540+ | 97.8% | β Production Ready |
Frontend E2E Tests (Playwright)
cd sentinel_frontend npm test # Run all Playwright tests npm test -- auth.spec.ts # Run authentication tests npm test -- --headed # Run with browser UI
Performance Tests
cd sentinel_backend pytest tests/performance/ -v # Run all performance tests pytest tests/performance/test_load_performance.py -v # Load testing
π οΈ Development
Local Development Setup
Backend Services
-
Install dependencies
cd sentinel_backend poetry install -
Run individual services
# Example: API Gateway cd api_gateway poetry run uvicorn main:app --reload --port 8000
Frontend Application
-
Install dependencies
cd sentinel_frontend npm install -
Start development server
npm start # Runs on port 3000 with hot reload
Configuration
All configuration is centralized in sentinel_backend/config/settings.py:
from config.settings import get_settings, get_service_settings # Get configuration settings = get_settings() service_settings = get_service_settings() # Use configuration database_url = settings.database.url timeout = service_settings.service_timeout
Environment Variables: All settings can be overridden with SENTINEL_* prefix:
export SENTINEL_DB_URL="postgresql+asyncpg://user:pass@host/db" export SENTINEL_APP_LOG_LEVEL="DEBUG" export SENTINEL_SECURITY_JWT_SECRET_KEY="your-secret-key"
Database Management
make init-db # Initialize or repair database make reset-db # Complete reset (WARNING: data loss) make backup-db # Backup to timestamped file make restore-db # Restore from backup
Useful Commands
make help # Show all available commands make start # Start all services make stop # Stop all services make restart # Restart services make status # Check service health make logs # View service logs make clean # Clean up containers and volumes
π€ Contributing
We welcome contributions! Whether you're fixing bugs, adding features, or improving documentation, your help is appreciated.
Quick Start
-
Fork the repository and clone your fork
git clone https://github.com/YOUR_USERNAME/sentinel-api-testing.git cd sentinel-api-testing -
Create a feature branch
git checkout -b feature/your-feature-name
-
Make your changes
- Follow the project's coding standards
- Write tests for new features
- Update documentation as needed
-
Run tests
cd sentinel_backend ./run_tests.sh -d -
Commit and push
git add . git commit -m "feat: add your feature description" git push origin feature/your-feature-name
-
Create a Pull Request
- Go to the repository on GitHub
- Click "New Pull Request"
- Select your branch
- Fill in the PR template
Development Guidelines
- Code Style: Follow PEP 8 for Python, ESLint for JavaScript/React
- Testing: Maintain 90%+ test coverage for new code
- Documentation: Update relevant docs for new features
- Commits: Use conventional commits (feat:, fix:, docs:, etc.)
Resources
- Contributing Guide - Detailed contribution instructions
- Code of Conduct - Community standards
- Development Setup - Technical documentation
Report Issues
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Support
π Documentation
- Complete Documentation - Full documentation portal
- FAQ - Frequently asked questions
- Troubleshooting Guide - Common issues and solutions
π¬ Community
- GitHub Issues: Report bugs or request features
- GitHub Discussions: Ask questions and share ideas
π§ Common Issues
Database connection errors# Fix database issues make init-db # Or complete reset make reset-db
# Check service status make status # View logs for errors make logs # Restart all services make restart
# Ensure backend is running make status # Check frontend logs docker-compose logs frontend # Restart frontend docker-compose restart frontend
- Ensure target API URL is valid (starts with
http://orhttps://) - Check target API is accessible:
curl http://your-api-url - Verify test suite has test cases assigned
π§ Contact
For additional support or questions:
- Open an issue on GitHub
- Check our documentation