create_test_plan_from_api_source
Generate a JMeter test plan from an OpenAPI file or explicit endpoint details, with configurable test profiles, assertions, and output file.
Instructions
Create a JMeter test plan from an API source. Supported sourceType values: openapi, endpoint.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | For sourceType=endpoint: raw request body | |
| name | No | Optional JMeter test plan name | |
| path | No | For sourceType=endpoint: request path, e.g. /v1/users | |
| loops | No | Loop count; use -1 for forever. For deterministic profiles, omit or match the policy value. | |
| users | No | Required only for testProfile=custom. For deterministic profiles, omit or match the policy value. | |
| method | No | For sourceType=endpoint: HTTP method | |
| envFile | No | For sourceType=openapi: optional .env file used for auth/data defaults | |
| headers | No | For sourceType=endpoint: request headers | |
| rampTime | No | Ramp-up time in seconds. For deterministic profiles, omit or match the policy value. | |
| serverUrl | No | For sourceType=endpoint: base server URL, e.g. https://api.example.com | |
| outputfile | Yes | Path where to save the .jmx file | |
| sourceFile | No | For sourceType=openapi: path to OpenAPI YAML/JSON file | |
| sourceType | Yes | API source type: openapi file or explicit endpoint details | |
| contentType | No | For sourceType=endpoint: Content-Type header | |
| serverIndex | No | For sourceType=openapi: 1-based server index | |
| testProfile | No | Deterministic profile: custom, smoke, baseline, load, spike, stress, or soak | custom |
| endpointIndex | No | For sourceType=openapi: 1-based endpoint index | |
| expectedStatus | No | Expected response code assertion, e.g. 200 | |
| durationSeconds | No | Duration for scheduled profiles such as soak. For deterministic profiles, omit or match the policy value. | |
| allowAggressiveLoad | No | Required for aggressive profiles or requests that exceed discovered rate limits. | |
| addResponseCodeAssertion | No | For sourceType=openapi: add a response-code assertion from the success response |