Unifies test execution and result processing across multiple frameworks for streamlined cross-language testing and analy...
Created byApr 23, 2025
Test Runner MCP
A Model Context Protocol (MCP) server for running and parsing test results from multiple testing frameworks. This server provides a unified interface for executing tests and processing their outputs, supporting:
Bats (Bash Automated Testing System)
Pytest (Python Testing Framework)
Flutter Tests
Jest (JavaScript Testing Framework)
Go Tests
Rust Tests (Cargo test)
Generic (for arbitrary command execution)
Installation
Prerequisites
The following test frameworks need to be installed for their respective test types:
Add the test-runner to your MCP settings (e.g., in claude_desktop_config.json or cline_mcp_settings.json):
Note: For Flutter tests, ensure you replace:
/opt/homebrew/Caskroom/flutter/3.27.2/flutter with your actual Flutter installation path
/Users/username/.pub-cache with your actual pub cache path
Update PATH to include your system's actual paths
You can find these values by running:
Running Tests
Use the run_tests tool with the following parameters:
Example for each framework:
Security Features
The test-runner includes built-in security features to prevent execution of potentially harmful commands, particularly for the generic framework:
Command Validation
Environment Variable Sanitization
Configurable Security
Security options you can configure:
Flutter Test Support
The test runner includes enhanced support for Flutter tests:
Environment Setup
Error Handling
Output Processing
Rust Test Support
The test runner provides specific support for Rust's cargo test:
Environment Setup
Output Parsing
Generic Test Support
For CI/CD pipelines, GitHub Actions via act, or any other command execution, the generic framework provides:
Automatic Output Analysis
Flexible Integration
Security Features
Output Format
The test runner produces structured output while preserving complete test output:
Results are saved in the specified output directory:
test_output.log: Raw test output
test_errors.log: Error messages if any
test_results.json: Structured test results
summary.txt: Human-readable summary
Development
Setup
Clone the repository
Install dependencies:
Build the project:
Running Tests
The test suite includes tests for all supported frameworks and verifies both successful and failed test scenarios.
CI/CD
The project uses GitHub Actions for continuous integration:
Automated testing on Node.js 18.x and 20.x
Test results uploaded as artifacts
Dependabot configured for automated dependency updates
Contributing
Fork the repository
Create your feature branch
Commit your changes
Push to the branch
Create a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Test Runner MCP
A Model Context Protocol (MCP) server for running and parsing test results from multiple testing frameworks. This server provides a unified interface for executing tests and processing their outputs, supporting:
Bats (Bash Automated Testing System)
Pytest (Python Testing Framework)
Flutter Tests
Jest (JavaScript Testing Framework)
Go Tests
Rust Tests (Cargo test)
Generic (for arbitrary command execution)
Installation
Prerequisites
The following test frameworks need to be installed for their respective test types: