How make JMeter generate specific request and wait for the specific response -


i don't know how make jmeter generate specific request , wait specific response. me? i'm testing web application. there specific jobs data calculations. in case when run job, on ui progress bar shown , every second i'm getting intermediate server response. job calculations time take 1-2 hours.

submit

•   request: o   post post "https:/myserver/web/api/datasets/684/cluster?viz-id=9242" 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

then need "location" response, , keep checking every second or posting location string in request

•   request: o   "https:/myserver/web/api/datasets/job-status" payload string "http:/localhost:8000/async/result/340" •   response: o   {"message":"ok","result":{"jobid":"340","status":"in_progress","tasklist":[]}} 

and keep checking until cacheid in response

•   request: o   post "https:/myserver/web/api/datasets/job-status payload string "http:/localhost:8000/async/result/340" •   response: o   {"message":"ok","result":{"colimp_data":"web-340.colimp.data","cacheid":1184}} 

get results

now parse last response cache id , generate http request

•   request: o   http:/myserver/web/api/cache/1184/colimp_data •   response: o   {"columnname":"type","columns":[  {"column":"sepalwidth","importance":93.13}]} 

i go following test plan structure:

while controller configuration:

  • put ${__javascript(vars.get('cacheid')==null,)} in "condition" input

regular expression extractor configuration:

  • reference name: cacheid
  • regular expression: "cacheid":(\d+)
  • template: $1$

get results configuration:

  • http request path: /myserver/web/api/cache/${cacheid}/colimp_data

while controller loop , execute "check" request until "cacheid" value extracted. once done - able use in "get results: request.


Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -