Labsco
iamsnh01 logo

Test Automator

from iamsnh01

An LLM-powered server for automating unit, integration, E2E, and API tests.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedAccount requiredAdvanced setup

πŸ€– Test Automator

A comprehensive, intelligent, and extensible testing automation platform powered by Large Language Models. Test Automator streamlines the process of generating, executing, and analyzing various types of software tests (unit, integration, end-to-end, API) for both web UI and backend logic.

Python 3.11+ License: MIT MCP Compatible Windows Compatible

✨ Features

🧠 LLM-Powered Test Generation

  • Intelligent Analysis: Automatically analyzes your codebase to understand structure and dependencies
  • Smart Test Cases: Generates comprehensive test scenarios including edge cases and error conditions
  • Context-Aware: Understands your code patterns and generates idiomatic tests
  • Multi-Language Support: Optimized for Python with extensible architecture

πŸ”§ Comprehensive Test Types

πŸ”¬ Unit Testing

  • Analyzes individual functions, methods, and classes
  • Generates pytest test functions with proper fixtures
  • Includes positive, negative, and edge case scenarios
  • Handles both sync and async code patterns

πŸ”— Integration Testing

  • Tests interactions between different modules and services
  • Simulates real component interactions
  • Uses appropriate mocking strategies
  • Tests configuration and initialization flows

🌐 End-to-End (E2E) Testing

  • Browser automation using Playwright and browser-use
  • Simulates real user interactions
  • Tests complete user workflows
  • Captures screenshots and generates visual reports

πŸš€ API Testing

  • Comprehensive HTTP endpoint testing
  • Request/response validation
  • Authentication and authorization testing
  • Performance and timeout testing

πŸ“Š Intelligent Reporting

  • LLM-Enhanced Analysis: AI-powered insights from test results
  • Multi-Format Support: XML, JSON, and HTML report parsing
  • Actionable Recommendations: Specific suggestions for improvement
  • Risk Assessment: Identifies critical areas needing attention

🎯 Advanced Features

Large Codebase Support (100k-200k lines)

  • Modular Analysis: Processes code in manageable chunks
  • Incremental Testing: Generates tests incrementally for better performance
  • Parallel Execution: Supports pytest-xdist for parallel test runs
  • Smart Filtering: Focuses on testable units to avoid overwhelming LLM

Cross-Platform Compatibility

  • Windows Native: Full support with proper path handling
  • WSL Integration: Seamless Windows Subsystem for Linux support
  • Linux/macOS: Native Unix support
  • Event Loop Handling: Platform-specific async optimizations

Performance Optimizations

  • Async Operations: Non-blocking test execution
  • Batch Processing: Efficient handling of multiple test files
  • Resource Management: Proper cleanup and memory management
  • Timeout Handling: Configurable timeouts for different test types

πŸ“ Project Structure

test-automator/
β”œβ”€β”€ test_automator/
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ mcp_server.py          # Main MCP server with tools
β”‚   β”œβ”€β”€ test_generator.py      # LLM-powered test generation
β”‚   β”œβ”€β”€ test_runner.py         # Cross-platform test execution
β”‚   └── report_analyzer.py     # AI-enhanced report analysis
β”œβ”€β”€ pyproject.toml             # Package configuration
└── README.md                  # This file

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add 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

  • Gemini LLM: Google's powerful language model for intelligent test generation
  • Playwright: Cross-browser automation framework
  • pytest: Robust Python testing framework
  • MCP Protocol: Model Context Protocol for seamless AI integration
  • Claude Code: AI-powered development environment