pm.*|pm.* API

pm.test("aNameOfTestAsString", function(){/*"This function is to return a boolean value" */})
Note:pm.test() can only used in Tests field after the primary requests sent out.
pm.expect(pm.response.text()).to.include("string_to_search_in_response_body")

pm.response.to.be.*
pm.response.to.have("response_body_all")
pm.environment.set("key", "value")
pm.environment.get("key")
tests[ "String to print out if true " ] = pm.*API();
console.log("Print out this string to the postman console ==>View==>show postman console")
【pm.*|pm.* API】tests[ "Status code is 200" ] = pm.response.to.have.status(200)

    推荐阅读