Migrate JMeter Tests to Apidog: A Practical Guide
To migrate JMeter tests to Apidog, import the .jmx file (Apidog lists JMeter as a supported import format, and Apidog CLI accepts --format jmeter), review what landed, rebuild the flow as a test scenario, then confirm it passes a functional run before you load test it. Timers, Groovy scripts and non-HTTP samplers need manual work.
Below: what a .jmx file holds, how each element maps, where the mapping breaks, and how your coding agent can do the work with Apidog CLI.
What's inside a JMeter .jmx file
A .jmx file is the saved JMeter test plan: an XML tree of elements that JMeter runs top to bottom. The JMeter user manual defines the building blocks. Every request sits under a thread group, and every other element changes how those requests are sent, checked or timed.
Here's what you'll find when you open one:
- Thread Group: the simulated users. It sets the number of threads, the ramp-up period and the loop count.
- Samplers: the requests themselves. HTTP Request is the common one, but JDBC, FTP, LDAP and TCP samplers exist too.
- Logic controllers: If, While, Loop, Transaction and Simple controllers that decide order and repetition.
- Config elements: HTTP Request Defaults, Header Manager, Cookie Manager, CSV Data Set Config and User Defined Variables.
- Pre- and post-processors: extractors (Regex, JSON, XPath, Boundary) and JSR223 scripts, usually in Groovy.
- Assertions: Response, Duration, Size and JSON assertions.
- Timers: Constant, Gaussian Random and other delays between samplers.
- Listeners: result trees, aggregate reports and the HTML dashboard.
If you need a refresher on the tool itself, read what JMeter is and how it works before you start pulling plans apart.
Can Apidog import JMeter files?
Yes. The Apidog migration guide lists JMeter under "API Clients & Data Tools" with the description "Import Apache JMeter script files." Apidog CLI exposes the same importer: apidog import --help lists jmeter among the values for --format.
What the docs don't publish is an element-by-element mapping for JMeter imports. Postman's JMeter migration guide ships an import report with "imported exactly", "approximated" and "not supported" buckets; Apidog's manual import gives you a preview instead, where you pick what to bring in before you confirm. So treat the import as the first draft of your migration, not the finished suite. Open what landed, compare it with the .jmx tree, and fix the gaps by hand or with your agent.
One honest caveat: Apidog's performance testing is in beta and supports up to 100 virtual users per run. If your JMeter plan drives thousands of threads across a distributed setup, keep JMeter for that peak load and move the functional and regression side to Apidog.
How JMeter elements map to Apidog
Most of a typical HTTP test plan has a direct home in Apidog. The table shows where each element lives after migration and what to check once the import finishes.
| JMeter element | Where it lives in Apidog | Check after import |
|---|---|---|
| HTTP Request sampler | Endpoint request or test scenario step | Method, path, body and headers |
| HTTP Request Defaults | Environment base URL | One base URL per environment |
| Header Manager, auth | Request headers or auth settings | Tokens moved to variables, not hardcoded |
User Defined Variables ${var}
|
Environment or global variables {{var}}
|
Every ${} reference rewritten |
| JSON or Regex extractor | Extract Variable post processor (JSONPath, XPath) | The extracted name matches later steps |
| Response Assertion | Assertion post processor | Status and body checks still fire |
| Duration Assertion |
pm.test script on pm.response.responseTime
|
Threshold value |
| CSV Data Set Config | Test data, run in random or sequential match | Column names match variables |
| Loop, If, While controllers | For loop, If and other flow control conditions | Break and error handling |
| Transaction controller | Group in the test scenario | Step order |
| Constant Timer | Wait step | Delay in milliseconds |
| Thread Group | Performance test virtual users, duration, ramp-up | Under 100 virtual users |
| Listeners | Test reports in the app, or -r html,json,junit from the CLI |
Report lands where CI expects it |
The variable syntax change catches the most people. JMeter references ${token}, while Apidog uses {{token}}. Grep the scenario for a stray ${ after import; any you find will be sent as a literal string.
What doesn't carry over cleanly
Some JMeter features have no one-to-one equivalent, and pretending otherwise is how migrations go wrong. Plan for these:
-
Groovy and BeanShell scripts. Apidog's pre and post processor scripts run JavaScript with a Postman-style
pmAPI. Rewrite JSR223 logic in JavaScript; your coding agent is good at exactly this kind of translation. - Non-HTTP samplers. FTP, LDAP, TCP and JMS samplers test protocols outside an API client's scope. Keep those in JMeter. JDBC checks can often become Apidog database operations (MySQL, MongoDB, Redis and Oracle are documented), but rebuild them deliberately.
- Throughput shaping. JMeter's timers, throughput controllers and plugin thread groups tune request rate precisely. Apidog's performance test sets virtual users, duration and ramp-up, and each user loops through the scenario. Expect different requests-per-second numbers.
- Scale beyond 100 virtual users. That's the documented ceiling for Apidog performance tests today.
- Report exports for load runs. The docs say performance reports can't be exported yet; you view them in the client. Functional runs from the CLI export HTML, JSON and JUnit.
None of this blocks a migration; it decides which tests move. Usually the functional suite moves and a few peak-load plans stay. The JMeter API testing tutorial shows the kind of functional plan that moves cleanly.
Step-by-step: migrate a JMeter test plan
Here's the full route, from .jmx to a green CI job.
-
Record a baseline. Run the plan once in CLI mode, which the JMeter manual recommends for any load test:
jmeter -n -t checkout.jmx -l baseline.jtl -e -o baseline-report/. Note p95 latency and error rate. - Clean the plan. Disable listeners and remove dead branches. Move secrets out of the file.
-
Import it. Use the app's Import dialog or
apidog import --project <projectId> --format jmeter --file ./checkout.jmx. -
Review what landed. List endpoints and test scenarios, then compare them with the
.jmxtree using the table above. -
Fix the gaps. Rewrite
${}references, port scripts to JavaScript, attach CSV data as test data, add wait steps. - Run it functionally. A performance test is only useful once every request passes on its own, and Apidog's docs say the same.
- Load test it. In the app, set virtual users, duration and ramp-up on the scenario and compare p95 and error rate with your JMeter baseline at the same user count.
-
Wire it into CI with
apidog runand a JUnit report.
Let your coding agent migrate it with Apidog CLI
Steps 3 to 6 are mechanical, which makes them ideal agent work. Claude Code, Codex or Cursor can read the .jmx XML, run the import, diff the result and patch the gaps while you review.
Set up once:
npm install -g apidog-cli@latest
apidog auth login --with-token <YOUR_TOKEN>
apidog skill install
The skill teaches your agent the CLI's commands and schemas. If you'd rather let the agent do setup too, tell it: "Read https://apidog.com/apidog-cli-installation-guide.md and set up Apidog CLI." The Apidog CLI installation guide covers the same steps for humans.
Then give your agent one prompt from the folder that holds the plan:
Import ./checkout.jmx into Apidog project <projectId> with the jmeter format.
Then list what was created and compare it with the .jmx: every HTTP sampler,
extractor, assertion, CSV data set and controller. Fix variable syntax,
rewrite any Groovy JSR223 scripts as JavaScript, and give me a table of
anything that did not carry over. Finally run the checkout scenario against
the staging environment and summarize failures.
The agent runs commands like these:
apidog import --project <projectId> --format jmeter --file ./checkout.jmx
apidog endpoint list --project <projectId>
apidog test-scenario list --project <projectId>
apidog environment list --project <projectId>
apidog cli-schema get test-scenario-create
apidog run -t <scenarioId> --project <projectId> -e <envId> -r cli,json
Two flags matter for repeat imports. --overwrite-mode sets the conflict strategy (overwrite, merge, ignore or keepBoth, default overwrite), and --branch lets you import into a sprint branch so the migration doesn't touch main until you've reviewed it. Before it writes any JSON payload, the agent should run apidog cli-schema get and apidog cli-schema validate; the CLI's own help says not to build payloads from memory. For a deeper look at this workflow, see Apidog CLI in Claude Code.
Run the migrated tests in CI
Once the scenario passes locally, CI is one command. apidog run writes cli, html, json or junit reports, and JUnit is what GitHub Actions, GitLab and Jenkins read natively:
apidog run -t <scenarioId> --project <projectId> -e <envId> \
-r cli,junit --out-dir apidog-reports --upload-report
--upload-report sends the run overview to the cloud so your team can open it in the app. Data-driven runs take -d with a CSV, JSON or test data ID, which replaces JMeter's CSV Data Set in the pipeline. --on-error accepts ignore, continue or end. The Apidog CLI CI/CD pipeline guide has full workflow files, and the apidog run command reference covers every flag.
Keep JMeter running in parallel for a release or two. When the Apidog suite catches the same regressions and your load numbers line up at the same user count, retire the matching .jmx files. If you're still weighing tools, the JMeter alternatives roundup compares the field.
FAQ
Does Apidog import .jmx files directly? Yes. JMeter is a listed import format in the Apidog docs, and Apidog CLI accepts apidog import --format jmeter --file <path>. Review the result against the original plan, because the docs don't publish a per-element mapping.
Can I export Apidog tests back to JMeter? Yes. Apidog's docs say test scenarios can be exported as Apidog CLI, Postman and JMeter data files, so you can run them in JMeter if a team still needs it.
How many virtual users does Apidog support for load tests? The performance testing docs say up to 100 virtual users per run, and the feature is in beta. Keep JMeter for distributed tests above that.
What happens to my Groovy scripts? They don't run in Apidog. Rewrite them as JavaScript pre or post processor scripts, which use a Postman-style pm API. A coding agent can translate most JSR223 snippets quickly; review the output.
Do I need to change variable syntax? Yes. JMeter uses ${var} and Apidog uses {{var}}. Search the migrated scenario for leftover ${ before your first run.
Is Apidog free for this? The Apidog Free plan covers up to 4 users, which is enough to migrate a team's functional suite and run it in CI.


Top comments (0)