postman-collection-runner

Reuse {{$randomInt}} in Postman

☆樱花仙子☆ 提交于 2019-12-11 01:15:24
问题 My 1st request is: GET http://example.com?int={{$randomInt}} . I need to run 2nd request (with other tests in it) to the same address, so I need to save generated variable. How can I do it? I was trying pm.variables.get("int") in the "Tests" sandbox after 1st request, but this code cannot see int var. Creating random number in Pre-req. sandbox to 1st request: postman.setGlobalVariable('int', Math.floor(Math.random() * 1000)); doesn't help either, because I need to use this param in the URL,

Postman: How to extract value from html response and pass it on to next request in postman

扶醉桌前 提交于 2019-12-10 11:56:16
问题 Example url: https://abc.xyz.com/m# HTML Response: <!DOCTYPE html> <html lang="en" dir="ltr"> <head> . . </head> <body class="abc"> . . . <script>xab.start('{\"first\":\"123xyz\",\"second\":\"abc123\",\"third"..;</script> </div> </body> </html> In the above mentioned response i want to extract the value of the parameter second '("second\":\"abc123\")' from the response and pass it on to the next request. It would be simpler if the response is JSON, but in the case this is HTML response. I was

How can I view responses in Postman Collection Runner?

荒凉一梦 提交于 2019-12-10 02:28:39
问题 I am using the Postman Collection Runner to run the same request multiple times using iterations. My tests work as expected, but I'm not able to see the individual responses for each request. Is it possible to view the responses for requests in the Postman Collection Runner? 回答1: In the latest version of Postman you can see all the data from the collection run for each individual request. In the Collection Runner, Click on the request name and all the details of the request and response can