JMeter: How to know why my regular expression extractor in JMeter is not extracting the data

元气小坏坏 提交于 2019-12-20 04:55:37

问题


I would like to know why regular expression extractor in JMeter is not extracting the data after parameterization. Response message: Internal Server Error

Expression added are:

  1. name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="(.+?)"

  2. name="__VIEWSTATE" id="__VIEWSTATE" value="(.+?)"

POST data:
__VIEWSTATE=%24%7BviewState%7D&__EVENTVALIDATION=%24%7BeventValidation%7D&txtUserID=1001201&txtPWD=CFL&BtnSubmit=Submit&hdnE=5&hdnN=323&hdnD=173

回答1:


Your regexp is probably wrong.

To debug it, run your test then use View Results Tree and select Regexp Tester:

You can then test your regexps and see what happens.

As I don't have the response content that contains the 2 tokens, I can only guess that regexp should be :

  • name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="([^"]+?)" , see https://regex101.com/r/aG1gX2/1

  • name="__VIEWSTATE" id="__VIEWSTATE" value="([^"]+?)" , see https://regex101.com/r/iM5cZ3/1



来源:https://stackoverflow.com/questions/32797774/jmeter-how-to-know-why-my-regular-expression-extractor-in-jmeter-is-not-extract

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