test runner.com
test runner.com logo

Test Runner

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:
  • Bats: apt-get install bats or brew install bats
  • Pytest: pip install pytest
  • Jest: npm install --save-dev jest

Usage

Configuration

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:
  1. Command Validation
  1. Environment Variable Sanitization
  1. Configurable Security
Security options you can configure:

Flutter Test Support

The test runner includes enhanced support for Flutter tests:
  1. Environment Setup
  1. Error Handling
  1. Output Processing

Rust Test Support

The test runner provides specific support for Rust's cargo test:
  1. Environment Setup
  1. Output Parsing

Generic Test Support

For CI/CD pipelines, GitHub Actions via act, or any other command execution, the generic framework provides:
  1. Automatic Output Analysis
  1. Flexible Integration
  1. 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

  1. Clone the repository
  1. Install dependencies:
  1. 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

  1. Fork the repository
  1. Create your feature branch
  1. Commit your changes
  1. Push to the branch
  1. 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:
  • Bats: apt-get install bats or brew install bats
  • Pytest: pip install pytest
  • Jest: npm install --save-dev jest

Usage

Configuration

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:
  1. Command Validation
  1. Environment Variable Sanitization
  1. Configurable Security
Security options you can configure:

Flutter Test Support

The test runner includes enhanced support for Flutter tests:
  1. Environment Setup
  1. Error Handling
  1. Output Processing

Rust Test Support

The test runner provides specific support for Rust's cargo test:
  1. Environment Setup
  1. Output Parsing

Generic Test Support

For CI/CD pipelines, GitHub Actions via act, or any other command execution, the generic framework provides:
  1. Automatic Output Analysis
  1. Flexible Integration
  1. 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

  1. Clone the repository
  1. Install dependencies:
  1. 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

  1. Fork the repository
  1. Create your feature branch
  1. Commit your changes
  1. Push to the branch
  1. Create a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.