vjgit-369/JmeterDemoUsingMCP
3.1
If you are the rightful owner of JmeterDemoUsingMCP and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Model Context Protocol (MCP) server facilitates communication between JMeter and MCP-compatible clients for performance testing.
JMeter Demo Using MCP
This project demonstrates how to use JMeter with Model Context Protocol (MCP) for automated performance testing.
Prerequisites
- Python 3.x
- Apache JMeter
- MCP-compatible client (e.g., Cursor)
Project Structure
JmeterDemoUsingMCP/
āāā jmeter/ # JMeter installation directory
āāā jmeter-mcp-server/ # MCP server for JMeter integration
ā āāā test_mcp.py # Test execution script
ā āāā jmeter_server.py # JMeter MCP server implementation
āāā AutomationExercise_Test.jmx # Sample JMeter test plan
Setup
- Install JMeter and set up the environment:
# Set JMETER_HOME environment variable
JMETER_HOME=/path/to/apache-jmeter
- Install Python dependencies:
pip install mcp pydantic
Usage
- Run tests in GUI mode:
python test_mcp.py
- Run tests with increased users:
# Modify test_mcp.py parameters:
'-Jthreads=10' # Number of users
'-Jrampup=20' # Ramp-up period
'-Jduration=60' # Test duration
Features
- GUI and Non-GUI test execution
- Configurable thread count and test duration
- Automated HTML report generation
- Real-time test monitoring
Test Results
Results are saved in:
- JTL files:
results*.jtl
- HTML reports:
report*/index.html
Contributing
Feel free to submit issues and enhancement requests!