Convert OpenAPI 3.0, OpenAPI 3.1, and Swagger 2.0 JSON or YAML into an Apache JMeter JMX test plan in your browser.
Operations
User Defined Variables
Generated Apache JMeter JMX XML
JMeter 5.6.3Use this converter through MCP
Connect an AI agent and call convert_openapi_to_jmx to convert OpenAPI or Swagger JSON/YAML into the same JMeter test plan format.
claude mcp add jmeter-docs https://docs.jmeter.ai/api/mcp --transport httpConversion runs locally in your browser. Review generated sample values, credentials, assertions, and request order before running load. See the cURL & HAR converter, JMX Linter, and HTTP Request reference.
What gets generated
Section titled โWhat gets generatedโThe converter turns each included API operation into a JMeter HTTP Request sampler and builds the surrounding Test Plan, HTTP Request Defaults, Thread Group, optional Cookie Manager, and response assertions.
- Servers become HTTP Defaults: the selected OpenAPI server supplies the protocol, host, port, and path prefix. With host extraction enabled, the host is stored as
${BASE_URL}. - Path parameters become variables:
/users/{userId}becomes/users/${userId}. A generated User Defined Variable contains the schema example or aCHANGE_MEplaceholder. - Schemas become sample bodies: JSON and form bodies are populated from examples, defaults, enums, formats, and referenced schemas.
- Security becomes variables: bearer authentication becomes
${AUTH_TOKEN}and API-key authentication becomes${API_KEY}. Basic authentication uses${BASIC_AUTH}. - Assertions catch unexpected responses: the optional response assertion accepts HTTP 200, 201, and 204 as a starting point. Adjust it to match each API contract.
Supported specification features
Section titled โSupported specification featuresโ| Feature | Support |
|---|---|
| OpenAPI versions | OpenAPI 3.0, OpenAPI 3.1, and Swagger 2.0 |
| Input formats | JSON and YAML |
| Local references | #/components/..., #/definitions/..., #/parameters/..., and #/responses/... |
| Request bodies | JSON, application/*+json, URL-encoded forms, text examples, and XML examples |
| Parameters | Path, query, and header parameters; optional query parameters are opt-in |
| Security | Bearer, OAuth2/OpenID Connect, HTTP Basic, and header/query API keys |
| Schema composition | allOf merging; the first oneOf or anyOf branch is used |
| Known limitations | Multipart bodies, cookie parameters, and external $ref documents are not converted |
Operation order follows the source documentโs path order and a stable HTTP method order. The generated plan does not infer a business workflow or dependencies between endpoints, so reorder samplers and add correlation where needed.
Filling in variables before running
Section titled โFilling in variables before runningโOpen the generated Test Planโs User Defined Variables element and replace CHANGE_ME placeholder values and sample IDs. You can also replace values at runtime with JMeter properties after changing the corresponding variable value to a property function such as ${__P(apiKey,CHANGE_ME)}.
For secrets, avoid committing real values to the .jmx. Supply them through your CI secret store and -J properties instead.
Running in CLI mode
Section titled โRunning in CLI modeโRun generated plans in non-GUI mode:
jmeter -n -t openapi-test-plan.jmx -l results.jtl -e -o ./reportThe generated Thread Group already reads concurrency, ramp-up, and duration from JMeter properties, so you can override them without editing the plan:
jmeter -n -t openapi-test-plan.jmx \ -Jthreads=100 -JrampUp=30 -Jduration=300 \ -l results.jtl -e -o ./reportA duration greater than zero enables the scheduler and infinite looping for the configured duration.
Use via MCP
Section titled โUse via MCPโConnect an MCP-compatible agent:
claude mcp add jmeter-docs https://docs.jmeter.ai/api/mcp --transport httpAsk the agent to call convert_openapi_to_jmx with an OpenAPI 3.x or Swagger 2.0 document in JSON or YAML. It can apply the same server, method, tag, deprecated-operation, path-value, assertion, and Cookie Manager options as the browser converter and returns the generated JMX XML in its response.
Related tools
Section titled โRelated toolsโ- Use the cURL & HAR to JMX Converter when you have captured requests rather than an API contract.
- Run the generated plan through the JMX Linter & Health Analyzer before execution.
- Review JMeter Best Practices before increasing load.