postmanlabs / newman

Newman is a command-line collection runner for Postman
https://www.postman.com
Apache License 2.0
6.78k stars 1.15k forks source link

Using json reporter generates the wrong items in the section 'run->execution' #3235

Open sergeymeishutovich opened 1 month ago

sergeymeishutovich commented 1 month ago

When using Newman with the JSON reporter, it seems that the section 'run->execution' contains invalid items.

I created a Postman collection with one request (for instance, GET http://example.com) and added a pre-request script for this request. In this script, 'pm.sendRequest' was added with the second request (for instance, POST https://postman-echo.com/post). This collection was exported and run by Newman (command line: newman run test_01.json -r cli,json).

In the report file, within the section 'run->execution', there are two sections, and these sections are completely equal with information about the last request-response 'GET'. I would expect the section to contain two different responses, 'POST' and 'GET'.

Newman Version (can be found via newman -v): 6.1.2 OS details (type, version, and architecture): Windows 11 Are you using Newman as a library, or via the CLI? Newman via CLI Did you encounter this recently, or has this bug always been there: Expected behaviour: I would expect the json section run->execution contains different responses Command / script used to run Newman: newman run test_01.json -r cli,json

Screenshot_2 Screenshot_1 test_01.json