Step 1: Add thread Group to test plan
Step 2: Add Http Request as a child to test paln
Here, we are able to get SID value , which is encrypted. So in next request we need to pass this value (not encrypted value, need to pass decrypted value)
Step 3: Add Http Request and Pass the Decrypted SID value to this request
Here add the small logic ${__urldecode(${SID})}
Step 4: Add the "Post processor" of " BeanShell PostProcessor" as a child to your Step 2 and paste the below code in script location.
vars.put("SID_J", "${__urldecode(${SID})}");
SID_J=vars.get("SID");
f = new FileOutputStream("C:\\OfficeWork\\Java\\id.txt"); //Windows
p = new PrintStream(f);
this.interpreter.setOut(p);
print(SID_J);
f.close();
Step 2: Add Http Request as a child to test paln
Here, we are able to get SID value , which is encrypted. So in next request we need to pass this value (not encrypted value, need to pass decrypted value)
Step 3: Add Http Request and Pass the Decrypted SID value to this request
Here add the small logic ${__urldecode(${SID})}
Step 4: Add the "Post processor" of " BeanShell PostProcessor" as a child to your Step 2 and paste the below code in script location.
vars.put("SID_J", "${__urldecode(${SID})}");
SID_J=vars.get("SID");
f = new FileOutputStream("C:\\OfficeWork\\Java\\id.txt"); //Windows
p = new PrintStream(f);
this.interpreter.setOut(p);
print(SID_J);
f.close();
No comments:
Post a Comment