无法在Jmeter负载测试中处理视图/状态和事件验证 [英] Could not handle View/state and Event validation in Jmeter Load testing

查看:186
本文介绍了无法在Jmeter负载测试中处理视图/状态和事件验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在对.Net Web应用程序进行负载测试.在这种情况下,用户将登录并执行某些导航步骤,然后他/她将填写一份评估表,提交该评估表,然后从应用程序中注销.

I am currently load testing a .Net web application. In which scenario is like, user will login and will do certain steps of navigation then he/she will fill one evaluation form, submit it and then logout from the application.

因此,在这种情况下,存在许多GET和POST请求.作为其.Net应用程序服务器,它将使用view-State和_Event-Validation进行一些身份验证.但是要处理该事情,我不确定从哪个请求中获取这2个参数并将其传递给哪个请求,因为这种情况是GET和POST请求的组合.这是请求的顺序.

So for this scenario there are many GET and POST request are there. And as its a .Net application server will do some authentication using view-State and _Event-Validation. But to handle that thing I am not sure from which request I need to fetch those 2 Parameter and pass it to which request, as this scenario is a combination of GET and POST requests.Here are the order of requests.

登录(GET) 登录(POST) 首页(GET) 首页(POST) 评估(GET) 评估(POST)->将根据客户端名称加载程序列表 评估(POST)->它将提交客户端和程序名称以获取特定的评估表 评估(GET) 评估(POST) 评估(GET) 注销(GET)

Login (GET) Login (POST) Home (GET) Home (POST) Evaluation (GET) Evaluation (POST) --> It will load list of program according to client name Evaluation (POST) -->It will submit client and Program name to fetch the particular evaluation form Evaluation (GET) Evaluation (POST) Evaluation (GET) Logout (GET)

所以伙计们帮我把这东西做空了

So guys help me to short this thing out

推荐答案

您需要使用以下PostProcessor之一,以提取VIEWSTATE和EVENTVALIDATION值并将其转换为JMeter变量:

You need to use one of the following PostProcessors in order to extract VIEWSTATE and EVENTVALIDATION values and get them converted to JMeter variables:

  • Regular Expression Extractor
  • CSS/JQuery Extractor
  • XPath Extractor

有关真实示例,请参见使用JMeter进行ASP.NET登录测试指南.提取器的样本配置.

See ASP.NET Login Testing with JMeter guide for real-life example and sample configuration of the extractors.

也不要忘记在测试计划中添加 HTTP Cookie管理器代表浏览器cookie,处理基于cookie的身份验证并模拟浏览器会话.

Also don't forget to add HTTP Cookie Manager to your test plan to represent browser cookies, deal with cookie-based authentication and simulate browser session.

这篇关于无法在Jmeter负载测试中处理视图/状态和事件验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆