-
Find the static value in the Select request body. You shall get it in the “parameters” node.
-
Select a value in the list of parameters, right click and select “Replace with Parameter” -> “Create new parameter”.
-
Enter the parameter name.
-
Repeat step 2 to 3 until all values are parameterized
In the example script below, the Select request has been parameterized with the parameters <customerID> and <NotName>:
web_custom_request("SelectWithParm", "URL=http://192.168.178.125:5001/api/ServerApi/SelectWithParm", "Method=POST", "Resource=0", "RecContentType=application/json", "Referer=", "Snapshot=t358.inf", "Mode=HTTP", "EncType=application/json;charset=UTF-8", "Body={\"version\":\"1.0\",\"requestid\":\"7C362898-230B-4858-AB15-2241DC3FD982\",\"appname\": \"psapi4loadrunner\",\"namespace\":\"Psapi4loadrunner\",\"session\":\"""<gs_SessionID>\", \"type\":11,\"transaction\":{\"transactionid\":\"""<gs_TransactionID>\",\"transactionname\": \"sqlca\"},\"content\":{\"esqlselect\":{\"modulename\":\"\",\"sqlid\":\"sqlHandle_01_2763E2FE\", \"parameters\""":[{\"category\":1,\"name\":\"name\",\"type\":\"int\",\"value\":<customerID>}, {\"category\":1,\"name\":\"name\",\"type\":\"string\",\"value\":\"<NotName>\"}]}}}", LAST);