If I send another request inside the Test Script, and run the collection via Newman, instead of the information of main the request , the information of the request in the Test Script returns in the Postman Cloud report and HTML report. Has anyone encountered such a problem?
For example:
Main request: GET baseUrl/user
Test Script: DELETE baseUrl/user (used pm.sendRequest)
In the report:
DELETE baseUrl/user appears as the main request in the report.
Depending on the HTML reporter that youβre using, if itβs htmlextra, it wonβt show those async requests are a separate request in the report. Thereβs also known issues with the report around the number of tests shown when using sendRequest().
Would you be able to provide more details and visual examples of your problem, please?
I have a test collection consisting of 8 requests, and in the pre-request and test scripts of the 4th request, Iβm sending a post request using pm.sendRequest(). When I run this collection through Postman, the 8 requests work sequentially, and the report in the Postman UI is accurate. So far, there is no problem.
However, if I run this collection with Newman, it counts each pm.sendRequest() as a separate request, and in the terminal, I see that 10 requests were made instead of 8. Iβm using htmlextra and postman-cloud for reporting. When I look at both reports, it appears as though 10 requests were made. The most problematic part is this: the main 4th request, its pre-request and test script, including 3 requests, appear as if they were the same request. Whichever request is made last, all 3 requests appear as that last request. Normally, the 4th request was a GET request, but since a POST request was made in the last test script, all requests related to this request appear as the POST request made in the test script.