简体   繁体   English

JMeter和double等号(==)在视图状态

[英]JMeter and double equals signs (==) in viewstate

I'm using JMeter to loadtest a ASP .NET web application but I get problems when viewstate 我正在使用JMeter对ASP .NET Web应用程序进行负载测试,但是在viewstate时遇到问题
contains double equals signs (==) at the end of the string. 在字符串的末尾包含双等号(==)。
I extract the viewstate from the previous get-request with a Regular Expression Extractor and have 我使用正则表达式提取器从先前的get请求中提取了viewstate并具有
verified in Debug Sampler that my parameter contains the double equals signs, but when posting 在Debug Sampler中验证了我的参数包含双等号,但是在发布时
the viewstate value ${viewstate1} with the __VIEVSTATE parameter the double equals signs are 带有__VIEVSTATE参数的双精度等号的viewstate值$ {viewstate1}
removed from the request. 从请求中删除。

How can I include the equals signs in the request so that I get a valid viewstate? 如何在请求中包含等号,以便获得有效的viewstate? Is there perhaps a pre/post processor I can use to add the missing equals signs? 也许可以使用前置/后置处理器来添加缺失的等号? Examples? 例子?

After running the requests through fiddler and comparing results from JMeter requests and browser requests I found that the problem was not with the double equals signs, but with an extra space at the end of the viewstate. 通过提琴手运行请求并比较JMeter请求和浏览器请求的结果后,我发现问题不在于双等号,而在viewstate的末尾有额外的空间。 The extra space was added because the template in my Regular Expression Extractor had a space after $1$ . 之所以添加了额外的空间,是因为我的正则表达式提取器中的模板在$ 1 $之后有一个空格。 Removing this space from the template fixed the viewstate and my requests came through. 从模板中删除此空间修复了viewstate,并且我的请求通过了。

The reason for targeting the double equals signs as the problem was that under the Request tab of the View Results Tree I only looked at the parameter values on the HTTP tab. 将双精度等号作为目标的原因是该问题是,在“查看结果树”的“请求”选项卡下,我仅查看了“ HTTP”选项卡上的参数值。 On the tabular display on the HTTP tab the equals signs do not show, but on the Raw tab they show as %3D%3d (ie ==). 在HTTP选项卡上的表格显示中,等号不显示,但是在Raw选项卡上,它们显示为%3D%3d(即==)。

Since I found the answer to my own question I could have deleted it, but I chose to post my findings with the regular expression templates in case some one else accidentally adds a space in that textbox. 因为我找到了自己问题的答案,所以可以删除它,但是我选择将其发现与正则表达式模板一起发布,以防其他人在该文本框中意外添加空格。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM