为什么我收到 :Error : "HTTP request Response Assertion:Test failed:text expected to contains/302/" [英] Why am I getting :Error : "HTTP request Response Assertion:Test failed:text expected to contain /302/"

查看:33
本文介绍了为什么我收到 :Error : "HTTP request Response Assertion:Test failed:text expected to contains/302/"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此外,您的断言失败了,因为您没有得到 302(redirect) 而是 200 (success) .因此,除非您真的只想要 302,否则只需删除此断言,因为如果响应代码严格高于 399,则默认 JMeter 会将 Sample 标记为失败

08 nov 608 nov 508 nov 408 nov 308 nov 1 08 nov 2

Why am I getting :

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:

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 request Response Assertion:Test failed:text expected to contains/302/"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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