Quality Testing

Quality is delighting customers

How to handle dynamic values in Jmeter using HTTP URL Re-writing modifier


I have a HTTP Sampler request like this http://ipaddress:portno/Acvityid=AQLT4Zs10yS8OjdB83ozUg

where in this Activityid is getting changed every time and i am getting session expired error message.

How to handle this using HTTP URL Re-writing modifier??

Please suggest.



Views: 394

Reply to This

Replies to This Discussion

First you have to find out where the activity ID is coming from. It's most likely from the previous request. I imagine that protocol is something like that:

GET http://ipaddress:portno/Acvityid=AQLT4Zs10yS8OjdB83ozUg


....data....Activituid=newValueForActivityId....more data

Next expected request is:

GET http://ipaddress:portno/Acvityid=newValueForActivityId

To get the "newValueForActivityId" you must use post processor at the previous step. Depending what kind the data is you can use Regular Expression Extractor, JSON extractor or in the worst case JSR223 PortProcessor. You store the extracted value from the previous step to the variable which you use at the next request.

When I'm biulding JMeter tests I quite often debug the traffic with Zed Attack Proxy. (https://www.owasp.org/index.php/OWASP_Zed_Attack_Proxy_Project) It's powerful tool for understanding the http-communication. But it needs time for learning.


TTWT Magazine





© 2021   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service