为什么我得到:Error:"HTTP请求响应断言:测试失败:文本应包含/302/" [英] Why am I getting :Error : "HTTP request Response Assertion:Test failed:text expected to contain /302/"

查看:2211
本文介绍了为什么我得到:Error:"HTTP请求响应断言:测试失败:文本应包含/302/"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

11月6日 08年11月4日 11月3日 11月2日

我为什么得到:

HTTP请求响应断言:测试失败:断言结果"中的文本预期包含/302/错误

HTTP request Response Assertion:Test failed:text expected to contain /302/" error in "Assertion Results"

推荐答案

这是因为您没有在断言中检查正确的要测试的字段",因此需要检查响应代码而不是文本响应:

It's because you didn't check in your assertion the correct "Field to Test", you need to check Response Code not Text Response:

您的声明也失败了,因为您没有获得302(重定向),而是获得了200(成功). 因此,除非您真的只想要302,否则只需删除此断言即可,因为如果响应代码严格高于399,默认JMeter会将Sample标记为失败

Also your assertion is failing because you don’t get a 302(redirect) but a 200 (success) . So unless you really only want 302, just remove this assertion as bu default JMeter will mark Sample as failed if response code is strictly higher than 399

这篇关于为什么我得到:Error:"HTTP请求响应断言:测试失败:文本应包含/302/"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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