1
我不知道如何让JMeter生成特定请求并等待特定响应。任何人都可以帮我吗? 我正在测试Web应用程序。有数据计算的具体工作。 在我的情况下,当我运行一个工作,在用户界面上显示进度条,每秒我都得到中间服务器响应。 作业计算时间可能需要长达1-2小时。JMeter如何生成特定请求并等待具体响应
提交
• REQUEST:
o POST POST "https:/myserver/web/api/datasets/684/cluster?viz-id=9242"
with payload in json: {"dbType":"unit","columnName":"Type", "version":0,"useWeight":false, "weightColumnName":"", "useWeightAsAttribute":false, "extraAttributes":9, "ignoreColumns":[]}
• RESPONSE:
o {"message":"Ok","result":{"location":"http:/localhost:8000/async/result/340"}}
CHECK
然后,我需要从响应得到“位置”,并保持在要求张贴位置字符串 检查每一秒左右
• REQUEST:
o "https:/myserver/web/api/datasets/job-status"
with payload as string "http:/localhost:8000/async/result/340"
• RESPONSE:
o {"message":"Ok","result":{"jobId":"340","status":"IN_PROGRESS","taskList":[]}}
并继续检查,直到我得到cacheId作为回应
• REQUEST:
o POST "https:/myserver/web/api/datasets/job-status
with payload as string "http:/localhost:8000/async/result/340"
• RESPONSE:
o {"message":"Ok","result":{"colimp_data":"web-340.colimp.data","cacheId":1184}}
得到的结果
现在解析回应中最后一个获得缓存ID,并产生另一个HTTP请求
• REQUEST:
o GET http:/myserver/web/api/cache/1184/colimp_data
• RESPONSE:
o {"columnName":"Type","columns":[
{"column":"sepalWidth","importance":93.13}]}