问题
whenever I navigate to the link http://43.252.88.109:4006/BracketICT/testengine.aspx after starting the test from http://43.252.88.109:4006/BracketICT/?t=aZCcbzidJJKfFgrkk1RYPH0zHTl+MtTuoGeiUw0hEw48nLZUoPrfntO29VV2daEiR3cPbu25/Xf2a3Q1UMZs1tMlk3PvhYZb/aXd43cpH0Sp0Z1yTrWlkWOmJXsjTloRGTwk/LMZHkqQhW9CBVpyUsA==&uniqueID=dGdck61pZFjpiV7I05aERpx8kdvC0ymx&dev=1696661&reuse=1696661
there is a uniqueiD that is generated in the form data whenever i select any radio button and click on next. Also the next page that is generated has the same url i.e. http://43.252.88.109:4006/BracketICT/testengine.aspx where a new question is generated and hence a new unique ID on every page on redirection.
How do i extract the uniqueID parameter everytime from form Data i.e. Dynamic in nature?
回答1:
You need to use post processors Regular Expression Extractor to extract the value.
Add the Regular Expression Extractor in the request generating the uniqueID.
Add the details for the Regular Expression Extractor.
Here, you can check out in details the value of each field from Regular Expression Extractor
Regular Expression : &uniqueID=(.*?)&dev
Check out Regular Expressions for details.
- (Optional) Add a Beanshell PostProcessor to check the extracted value in the logs.
So, like this you can extract any data.
Hope, this resolves your concern.
来源:https://stackoverflow.com/questions/62192803/how-to-pass-dynamic-form-data-in-jmeter-on-re-direction