我是ruby-jmeter的新手。我使用了以下测试计划
test do
header name: 'Authorization', value: @auth_token
header name:'Content-Type',value:'application/json'
threads count: 1,loops: 2 do
# header({name: 'Authorization', value: @auth_token},{name:'Content-Type',value:'application/json'})
params=json_params
post name: 'Post request => ', url: 'url',
raw_body: params.to_json do
with_xhr
end
end
end.run(
path: @jmeter_path,
file: 'get_performance_report_for_create.jmx',
log: 'get_performance_report_for_create.log',
jtl: 'get_performance_report_for_create.jtl')
通常,当我执行api请求时,会得到如下响应正文
{
"status": 200,
"message": "Request submitted",
"Id":34523
}
如何使用ruby-jmeter获取每个线程和循环的响应主体? 有人可以帮忙吗