Why am I getting :Error : “HTTP request Response Assertion:Test failed:text expected to contain /302/”

前端 未结 2 607
心在旅途
心在旅途 2021-01-25 08:14

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/\"

2条回答
  •  别那么骄傲
    2021-01-25 08:52

    Basically you are getting this message because your HTTP response body doesn't contain the search pattern of 302.

    Also be aware that Contains assumes a Perl-compatible regular expression as an input, so double check your pattern, most probably you should switch to Substring option. See Regular Expressions and How to Use JMeter Assertions in Three Easy Steps articles for more details.

    And finally don't use google.com website for load testing practice, Google has intelligent mechanisms of DDoS attacks protection so your IP address can simply be blacklisted. Use either your local intranet resources or special dedicated sites like http://newtours.demoaut.com/ or http://blazedemo.com/ for your experiments.

提交回复
热议问题