.cursor/skills/jmeter-hitl-editing/SKILL.md
AI-assisted Human-in-the-Loop JMeter script analysis, component addition, editing, and headless smoke testing. Use when the user wants to analyze, edit, add components to, import, or modify a JMeter JMX script, or run a local JMeter smoke test.
npx skillsauth add canyonlabz/mcp-perf-suite jmeter-hitl-editingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This section provides context for humans and capable models. For the step-by-step execution instructions, skip to the Execution section below.
The HITL tools work on any valid JMX script, regardless of how it was created:
The workflow is interactive and user-directed, not a fixed linear pipeline. The user tells the agent what to analyze, add, or edit. The agent executes using the HITL MCP tools.
A JMX script can arrive in the artifacts folder from any of these sources:
artifacts/{test_run_id}/jmeter/ with an imported_ prefix..cursor/skills/playwright-browser-automation/SKILL.md..cursor/skills/jmeter-har-conversion/SKILL.md..cursor/skills/jmeter-swagger-conversion/SKILL.md.| Tool | Purpose | Key Parameters |
|------|---------|---------------|
| analyze_jmeter_script | Get script structure and node IDs | test_run_id, jmx_filename, detail_level |
| list_jmeter_component_types | Discover available component types | category (optional filter) |
| add_jmeter_component | Add a new component to the script | test_run_id, component_type, parent_node_id, component_config, position, dry_run |
| edit_jmeter_component | Edit an existing component | test_run_id, target_node_id, operations, dry_run |
| list_jmeter_scripts | List JMX scripts for a test run | test_run_id |
| start_jmeter_test | Run a headless JMeter test | test_run_id, jmx_path |
| stop_jmeter_test | Stop a JMeter test | test_run_id |
| get_jmeter_run_status | Poll running test for metrics | test_run_id, pid |
| generate_aggregate_report | Generate aggregate CSV report | test_run_id |
| analyze_jmeter_log | Analyze a JMeter log for test execution errors | test_run_id, log_source (e.g. "jmeter"/"blazemeter") |
The edit_jmeter_component tool supports these operations:
{"op": "rename", "value": "New Name"} — Rename a component{"op": "set_prop", "name": "property_name", "value": "new_value"} — Set a property{"op": "replace_in_body", "old": "find_this", "new": "replace_with"} — Replace text in body{"op": "toggle_enabled"} — Enable or disable a componentAdd assertions to all samplers:
response_assertion checking for status 200Parameterize hardcoded values:
detail_level="full" to see element propertiesvariables.undefined for missing variable definitionsedit_jmeter_component with replace_in_body to swap hardcoded valuescsv_dataset or user_defined_variables component to define new variablesAdd think time between steps:
constant_timer or flow_control_action as last child of each controllerprerequisites.mdc — test_run_id and artifact structure validationskill-execution-rules.mdc — Follow steps in order, collect inputs firstmcp-error-handling.mdc — MCP tool error handling (retry policy, reporting)jmeter-script-guardrails.mdc — Smoke test = 1/1/1, dry run first, analyze before editAfter headless execution, these files are written to artifacts/{test_run_id}/jmeter/:
| File | Purpose |
|------|---------|
| test-results.csv | Raw sample data (JTL) |
| {test_run_id}_aggregate_report.csv | Per-label aggregate stats |
| results_tree.csv | Detailed sample data (JMeter built-in) |
| aggregate_report.csv | Aggregate data (JMeter built-in) |
| {test_run_id}.log | JMeter execution log |
This is an interactive workflow. The user directs what to analyze, add, or edit. Follow the phases below, but Steps 3-4 repeat as many times as the user needs.
Ask the user for the following values. Do not proceed until all required values are collected.
REQUIRED:
test_run_id = [ask user]
CONDITIONAL:
jmx_source = [one of: "external", "already exists", "generate from HAR/Swagger/Playwright"]
jmx_path = [required if jmx_source is "external" — full path to the JMX file]
When: Only if the user is importing an external JMX file not already in the artifacts folder.
Input: test_run_id, jmx_path
Action:
artifacts/{test_run_id}/jmeter/ if it does not existartifacts/{test_run_id}/jmeter/imported_{filename}.jmxSave: jmx_filename = imported_{filename}.jmx
Skip this step if the JMX already exists in the artifacts folder.
Input: test_run_id, jmx_filename (optional — auto-discovers if not provided)
Action: Call MCP tool analyze_jmeter_script
analyze_jmeter_script(
test_run_id = {test_run_id},
jmx_filename = {jmx_filename},
detail_level = "detailed"
)
Expected response:
{
"status": "OK",
"test_run_id": "{test_run_id}",
"jmx_path": "artifacts/{test_run_id}/jmeter/...",
"hierarchy": "... tree outline ...",
"node_index": [ { "node_id": "...", "type": "...", "name": "..." }, ... ],
"variables": { "defined": {}, "used": [], "undefined": [] }
}
Save: node_index and hierarchy from the response. These contain the node_id
values needed for add/edit operations.
On error: If status is "ERROR", stop. Report the error to the user.
Present the hierarchy outline and key findings to the user. Ask what they want to add or edit.
This step repeats as many times as the user needs. Each cycle follows the same pattern.
Input: test_run_id, parent_node_id (from Step 2), user's request
Action: First, preview with dry run:
add_jmeter_component(
test_run_id = {test_run_id},
component_type = {type from user request or list_jmeter_component_types},
parent_node_id = {parent_node_id},
component_config = {config based on user request},
position = "last",
dry_run = true
)
Review the dry run output with the user. If approved, apply:
add_jmeter_component(
...same parameters...,
dry_run = false
)
Input: test_run_id, target_node_id (from Step 2), user's request
Action: First, preview with dry run:
edit_jmeter_component(
test_run_id = {test_run_id},
target_node_id = {target_node_id},
operations = [ {"op": "...", ...} ],
dry_run = true
)
Review the dry run output with the user. If approved, apply:
edit_jmeter_component(
...same parameters...,
dry_run = false
)
After every applied change: Go to Step 4 to re-analyze.
Input: test_run_id
Action: Call MCP tool analyze_jmeter_script
analyze_jmeter_script(
test_run_id = {test_run_id},
detail_level = "summary"
)
Verify the script structure is correct after the edit.
Save: Updated node_index (node IDs may have changed after edits).
Ask the user: "Do you want to make more changes?" — If yes, go back to Step 3.
When: Only if the user wants to run the script locally to validate it.
Critical: Smoke tests MUST use 1 thread, 1 second ramp-up, 1 loop. If the Thread Group has higher values, override to 1/1/1 before running.
list_jmeter_scripts(
test_run_id = {test_run_id}
)
Save: jmx_path from the scripts list.
start_jmeter_test(
test_run_id = {test_run_id},
jmx_path = {jmx_path}
)
Save: pid from the response.
Poll get_jmeter_run_status every few seconds until the test finishes:
get_jmeter_run_status(
test_run_id = {test_run_id},
pid = {pid}
)
generate_aggregate_report(
test_run_id = {test_run_id}
)
Present the results to the user. If errors are found and the user wants to debug,
follow the debugging skill at .cursor/skills/jmeter-debugging/SKILL.md.
When: Only if the user wants to analyze test results with PerfAnalysis.
analyze_test_results(
test_run_id = {test_run_id}
)
The PerfAnalysis MCP will find test-results.csv in the jmeter/ folder.
These rules apply to every step:
dry_run=true first, then dry_run=false to apply.testing
Orchestrates BlazeMeter and Datadog data extraction using dedicated subagents. Use when the user mentions subagent workflow, subagent orchestrator, or wants to run the BlazeMeter and Datadog extraction phases via subagents. This skill handles the extraction and handoff phases only — it does NOT run PerfAnalysis, PerfReport, or Confluence. After this skill completes, the user can continue with the performance-testing-workflow skill starting from Step 4 (PerfAnalysis).
testing
AI-assisted HITL revision of performance test reports with iterative refinement, version tracking, and optional Confluence publishing. Use when the user mentions report revision, AI-enhanced report, revise executive summary, revise key observations, revise issues table, or improve a performance report.
tools
Run Playwright browser automation to capture network traffic and generate a JMeter JMX script. Use when the user mentions browser automation, Playwright recording, test spec execution, browser-based network capture, or generating a JMeter script from a live browser session.
tools
End-to-end performance testing pipeline orchestrating BlazeMeter, Datadog, PerfAnalysis, PerfReport, and Confluence MCP workflows sequentially. Use when the user mentions performance testing workflow, E2E pipeline, BlazeMeter results, test run analysis, performance report generation, or end-to-end test processing.