JMeter 和视图状态中的双等号 (==)

发布于 2024-12-10 03:53:39 字数 262 浏览 6 评论 0原文

我正在使用 JMeter 来加载测试 ASP .NET Web 应用程序,但在查看状态时遇到问题
字符串末尾包含双等号 (==)。
我使用正则表达式提取器从先前的 get-request 中提取视图状态并有
在调试采样器中验证我的参数包含双等号,但是在发布时
视图状态值 ${viewstate1} 与 __VIEVSTATE 参数双等号是
从请求中删除。

如何在请求中包含等号以便获得有效的视图状态?是否有一个前/后处理器可以用来添加缺少的等号?例子?

I'm using JMeter to loadtest a ASP .NET web application but I get problems when 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
verified in Debug Sampler that my parameter contains the double equals signs, but when posting
the viewstate value ${viewstate1} with the __VIEVSTATE parameter the double equals signs are
removed from the request.

How can I include the equals signs in the request so that I get a valid viewstate? Is there perhaps a pre/post processor I can use to add the missing equals signs? Examples?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

陌若浮生 2024-12-17 03:53:39

通过 fiddler 运行请求并比较 JMeter 请求和浏览器请求的结果后,我发现问题不在于双等号,而在于视图状态末尾有一个额外的空格。
添加额外的空格是因为我的正则表达式提取器中的模板在 $1$ 之后有一个空格。从模板中删除这个空间修复了视图状态并且我的请求通过了。

将双等号作为问题的原因是,在“查看结果树”的“请求”选项卡下,我只查看了“HTTP”选项卡上的参数值。在 HTTP 选项卡的表格显示中,等号不会显示,但在 Raw 选项卡上,它们显示为 %3D%3d(即 ==)。

因为我找到了自己问题的答案,所以我可以将其删除,但我选择使用正则表达式模板发布我的发现,以防其他人不小心在该文本框中添加空格。

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.
The extra space was added because the template in my Regular Expression Extractor had a space after $1$ . Removing this space from the template fixed the viewstate and my requests came through.

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. On the tabular display on the HTTP tab the equals signs do not show, but on the Raw tab they show as %3D%3d (i.e. ==).

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文