pm.* API

作者: cutelittlePanda | 来源:发表于2018-03-28 20:29 被阅读0次

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")

tests[ "Status code is 200" ] = pm.response.to.have.status(200)

相关文章

网友评论

      本文标题:pm.* API

      本文链接:https://www.haomeiwen.com/subject/bgaycftx.html