here map looking :
- if user login retailer follow specific requests
- if user login reseller follow specific requests
what have done retailer :
- i have added 1 http post request login retailer
- also added beanshell postprocessor url of previous request return above login post request.
- i have added following code beanshell postprocessor make sure if returned url contains word "retailer" or not.
code :
string url = prev.geturl().tostring(); vars.put("url", url); if (vars.get("url").contains("retailer")) { log.info("pass"); } else { log.info("fail"); }
above code works well.
- next have added if controller , added retailer related http requests under if controller. not sure should write if controller tell if previous url contains word "retailer" follow http requests under if controller.
i tried following if controller seems not working :
"${url}".contains("retailer")
i feel jmeter ignoring if controller not getting error.
goal execute specific requests based on user role retailer/reseller.
you don't have contains()
function in javascript, need use indexof() function instead if controller condition should like:
"${url}".indexof("retailer") != -1
remember jmeter.log file when test doesn't work expected, in 99.9% of cases can figure out reason it.
Comments
Post a Comment