ajax jmeter,讨论:Jmeter 发送Ajax请求时,得不到响应数据

在使用JMeter进行性能测试时,遇到一个问题,即对于一个Ajax POST请求(如http://10.1.1.113:9999/rule/rule/preQueryRule.do),在结果树中无法查看到响应数据,而普通HTTP请求则可以正常获取。该Ajax请求的Header包含了Content-Type、X-Requested-With等信息,并且设置了Cookie。目前寻求解决方案。

新建一个Sampler--HTTP请求,程序是ajax请求,执行后,在结果树里查看不到响应数据,有没有解决办法?普通的http请求是可以拿到响应数据的

Ajax请求:

POSThttp://10.1.1.113:9999/rule/rule/preQueryRule.doHTTP/1.1

Accept: application/json, text/javascript, */*; q=0.01

Content-Type: application/json;charset=UTF-8

X-Requested-With: XMLHttpRequest

Referer:http://10.1.1.113:9999/rule/rule/toUnderwriting.do

Accept-Language: zh-cn

UA-CPU: AMD64

Accept-Encoding: gzip, deflate

User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)

Host: 10.1.1.113:9999

Content-Length: 152

Connection: Keep-Alive

Pragma: no-cache

Cookie: JSESSIONID=twlot2mhwnqk

普通的RAW:

POSThttp://10.1.1.113:9999/rule/rule/queryRule.doHTTP/1.1

Accept: text/html, application/xhtml+xml, */*

Referer:http://10.1.1.113:9999/rule/rule/toUnderwriting.do

Accept-Language: zh-CN

User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0)

Content-Type: application/x-www-form-urlencoded

UA-CPU: AMD64

Accept-Encoding: gzip, deflate

Connection: Keep-Alive

Content-Length: 118

Host: 10.1.1.113:9999

Pragma: no-cache

Cookie: JSESSIONID=143gpqekhi538

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值