How to pass dynamic form data in jmeter on re direction

巧了我就是萌 提交于 2020-06-29 04:14:17

问题


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.

  1. Add the Regular Expression Extractor in the request generating the uniqueID.

  2. 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.

  1. (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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!