TestScript requests appear as main request in the reports

Hello,

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.

Thank you in advance

Hey @security-explorer-92 :wave:

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?

Thank you Danny,

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.

requests and pre-req script:

requests and test script:

postman runner report:

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.

terminal after newman command:

Report uploaded to postman-cloud:

Html report:



image

Thank you in advance

Hey @security-explorer-92 :wave:

As I mentioned in the previous message, there are known issues around sendRequest() and the data coming into the reporter from Newman.

The reporter can only display the information that it gets from the Newman Summary Object.

No way, this has been an issue since 2017? Lost all my hope. :frowning:

The reporter is an open source community project - If there are changes or issues that you can fix, PRs are very welcome. :joy:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.