This is the Hierarchy i have on my Testplan
I have Beanshell preprocessor as below:
import org.json.JSONArray;
import org.json.JSONObject;
JSONObject obj = new JSONObject();
obj.put("customerId", "1234");
obj.put("dataSourceName", "ABCD");
JSONArray relateddata = new JSONArray();
relateddata.add("abc", "abc");
obj.put("relatedData", relateddata);
String data = obj.toJSONString();
vars.put("request", data);
My HttP Request is as below:
${request};
My RequestBody is :
POST http://www.url.com (just an example)
POST data:
${request};
[no cookies]
Could someone help me understand why my request variable is not being replaced and how can i get that replaced?