Teams move from LoadRunner to JMeter for cost, for CI pipelines, or because a new project already uses it. The scripts are the painful part. Years of VuGen scripts full of web_url, web_submit_data and correlation rules do not open in JMeter. AI tools can speed this up a lot, because the mapping between the two is mostly mechanical. They also make confident mistakes, so the method matters.
What converts and what does not
Before you start, sort your scripts. Web HTTP/HTML scripts are good candidates. Scripts with heavy C logic need more work. Scripts on GUI protocols such as Citrix, SAP GUI or TruClient have no JMeter equivalent, and no AI changes that.
Step 1: Give the AI one block, not the whole script
Pasting a 2,000-line Action.c gets you a summary, not a conversion. Work one transaction at a time. Remove real user names, passwords and host names first.
Convert this LoadRunner VuGen block (Web HTTP/HTML) to JMeter 5.6.
For each VuGen function, tell me which JMeter element to add, where
it goes in the tree, and every field value: method, path,
parameters, headers, extractor settings.
- web_reg_save_param_ex -> Boundary Extractor with the same LB/RB,
placed as a child of the request that returns the value
- {param} -> ${param}
- lr_think_time -> tell me where to put a timer
Do not generate JMX XML. List anything you could not convert.
lr_start_transaction("02_Login");
web_reg_save_param_ex("ParamName=csrf", "LB=name=\"_csrf\" value=\"",
"RB=\"", "Ordinal=1", SEARCH_FILTERS, "Scope=Body", LAST);
web_url("login_page", "URL=https://{host}/login", "Mode=HTML", LAST);
web_submit_data("login",
"Action=https://{host}/login", "Method=POST", "Mode=HTML",
ITEMDATA,
"Name=username", "Value={user}", ENDITEM,
"Name=password", "Value={pass}", ENDITEM,
"Name=_csrf", "Value={csrf}", ENDITEM,
LAST);
lr_end_transaction("02_Login", LR_AUTO);
Note the line "Do not generate JMX XML". AI tools can write a .jmx file, and for a tiny script it may even open. For anything real, generated JMX often has wrong element classes or missing properties, and you spend longer finding the error than building the steps by hand. A clear list of elements and field values is faster to apply and easy to check.
Step 2: Build the steps in JMeter
For the block above, a good answer looks like this:
- A Transaction Controller named
02_Login. - Inside it, an HTTP Request
GET /loginwith a Boundary Extractor child: namecsrf, left boundaryname="_csrf" value=", right boundary", match number 1. - A second HTTP Request
POST /loginwith parametersusername=${user},password=${pass},_csrf=${csrf}. - Test-plan level: HTTP Request Defaults with the host, an HTTP Cookie Manager, and a CSV Data Set Config for
user,pass.
Check the escaping when you copy boundaries. In C, \" is an escaped quote. In the JMeter field you type a plain ". This is the most common slip in converted extractors, by people and by AI.
Step 3: Replay with one user and compare
Run the new script with one thread and a View Results Tree. Compare each request with the VuGen replay log: same URLs, same parameters, same status codes. Then add a Debug Sampler to see the extracted variables. If ${csrf} shows up literally in a request, the extractor did not match.
Things the AI often gets wrong
- Ordinal=ALL. VuGen creates
param_1,param_2andparam_count. In JMeter use match number-1, which createsparam_1,param_2andparam_matchNr. Code that reads the count must change. - Think time and pacing. VuGen run-time settings are not in
Action.c. Read them from the scenario and add timers or a Constant Throughput Timer yourself. - vuser_init and vuser_end. Login once per user usually belongs in a Once Only Controller, or in a setUp Thread Group for shared data.
- C helper code. String handling and
lr_eval_stringlogic becomes a JSR223 element with Groovy. Ask the AI to translate it, then test it on its own.
| VuGen | JMeter |
|---|---|
web_add_header | HTTP Header Manager |
web_reg_find | Response Assertion |
lr_think_time | Constant or Uniform Random Timer |
| Run-time pacing | Constant Throughput Timer, or Flow Control Action with a timer |
| Custom C code | JSR223 with Groovy |
Frequently asked questions
Is it faster to re-record in JMeter?
For short flows, often yes. Recording with the HTTP(S) Test Script Recorder plus the AI for correlation can beat a line-by-line conversion. Conversion pays off when the VuGen script holds business logic you would otherwise lose.
Will response times match between the tools?
Not exactly. The tools differ in connection handling, resource downloads and timing details. Compare trends and transaction behaviour, not single numbers.
Can I convert many scripts automatically?
You can script parts of it, but review every converted script with a one-user replay before it goes into a load test.
Tomorrow in the AI in Performance Testing series: correlation in LoadRunner VuGen with AI, from web_reg_save_param_ex boundaries to ORD=ALL and the replay log.