JMeter:如何知道为什么我在JMeter中的正则表达式提取器未提取数据 [英] JMeter: How to know why my regular expression extractor in JMeter is not extracting the data
问题描述
我想知道为什么JMeter中的正则表达式提取器在参数化后没有提取数据. 响应消息:内部服务器错误
I would like to know why regular expression extractor in JMeter is not extracting the data after parameterization. Response message: Internal Server Error
添加的表达方式是:
-
name ="__ EVENTVALIDATION" id ="__ EVENTVALIDATION" value =(.+?)"
name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="(.+?)"
name ="__ VIEWSTATE" id ="__ VIEWSTATE" value =(.+?)"
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
推荐答案
您的正则表达式可能是错误的.
Your regexp is probably wrong.
要调试它,请运行测试,然后使用查看结果树"并选择Regexp Tester:
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.
由于我没有包含2个标记的响应内容,因此我只能猜测regexp应该为:
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 =([[^"] +?),请参见 https://regex101.com/r/aG1gX2/1
name ="__ VIEWSTATE" id ="__ VIEWSTATE" value =([[^"] +?),请参见 https://regex101.com/r/iM5cZ3/1
name="__VIEWSTATE" id="__VIEWSTATE" value="([^"]+?)" , see https://regex101.com/r/iM5cZ3/1
这篇关于JMeter:如何知道为什么我在JMeter中的正则表达式提取器未提取数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!