Test Runner MCP
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
Installation
Prerequisites
The following test frameworks need to be installed for their respective test types:
- Bats:
apt-get install bats
orbrew install bats
- Pytest:
pip install pytest
- Flutter: Follow Flutter installation guide
- Jest:
npm install --save-dev jest
- Go: Follow Go installation guide
Usage
Configuration
Add the test-runner to your MCP settings:
Running Tests
Use the run_tests
tool with the following parameters:
Example for each framework:
Output Format
The test runner produces structured output for all frameworks:
Results are saved in the specified output directory:
test_output.log
: Raw test outputtest_errors.log
: Error messages if anytest_results.json
: Structured test resultssummary.txt
: Human-readable summary
Development
Setup
- Clone the repository
- Install dependencies:Copynpm install
- Build the project:Copynpm run build
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.
Facilitates unified execution and result parsing for various testing frameworks, including Bats, Pytest, Flutter, Jest, and Go, through a Model Context Protocol interface.