1//断言返回吗为2002 pm.test("Status code is 200",function(){3 pm.response.to.have.status(200);4});5//断言返回结果中包含指定的字符串6 pm.test("Body matches string",function(){7 pm.expect(pm.response.text()).to.include("string_you_want_to_search");8});9//断言并检查返回的JSON数据10 pm.test("Your test name",function(){11var jsonData = pm.response.json();12 pm.expect(jsonData.value).to.eql(100);13});14//断言返14//断言返回的值等于一个字符串15 pm.test("Body is correct",function(){16 pm.response.to.have.body("response_body_string");17});18//断言响应头包含Content‐type19 pm.test("Content‐Type is present",function(){20 pm.response.to.have.header("Content‐Type");21});22//断言响应时间少于200MS23 pm.test("Response time is less than 200ms",function(){24 pm.expect(pm.response.responseTime).to.be.below(200);25});