我在loadrunner(VUGEN)中运行rest api服务时遇到问题,在soap ui中它工作正常。
我的数据包含大约 10 个字段,但是在请求时它将一个参数分成两个,然后我面临内部服务器错误。
请帮忙,如果我想在另一行写,无法继续换行
代码是:
Action()
{
web_custom_request("Calculate",
"URL=http://sdfsdfsdfgsdfgsdfgsdfgsdfgsd/sdfgsdf/sdfgsd",
"Method=POST",
"Resource=0",
"EncType=application/json",
"Mode=HTTP",
"Body={\"program\":\"L002\",\"Number\":null,\"serviceNumber\":\"09000\",\"customerStateName\":\"{state}\",\"storeCode\":\"{store}\",\"Amount\":\"{amount}\",\"paymentDetails\":[{\"type\":\"{types}\",\"amount\":{amount}\"}]}",LAST);
return 0;
}
无法用两行代码编写它,以防我尝试编写它会给出语法错误,例如,丢失或“丢失。无法编写请任何人帮助。
响应如下:
{"program":"L002","Number":null,"serviceNumber":"09000","customer
StateName":"MAHARASHTRA","storeCode":"1111","invoiceAmount":"50","paymentDetails":[{"type"
:"CASH","amount":50"}]}
线路正在中断,即 customerStateName 变为 customer,StateName 因为这个我收到了错误的响应请求,请帮助。