pm.test("Status code is 200",function(){
pm.response.to.have.status(200);});
pm.test("Body matches string",function(){
pm.expect(pm.response.text()).to.include("string_you_want_to_search");});
pm.test("Your test name",function(){var jsonData = pm.response.json();
pm.expect(jsonData.value).to.eql(100);});
pm.test("Body is correct",function(){
pm.response.to.have.body("response_body_string");});
pm.test("Content-Type is present",function(){
pm.response.to.have.header("Content-Type");});
pm.test("Response time is less than 200ms",function(){
pm.expect(pm.response.responseTime).to.be.below(200);});
pm.test("Successful POST request",function(){
pm.expect(pm.response.code).to.be.oneOf([201,202]);});
pm.test("Status code name has string",function(){
pm.response.to.have.status("Created");});// ps: 1.在断言中不能够使用{{}}的方式取全局变量。// 2.一般通过:pm.globals.get("times") 取全局变量的值