Postman desktop app (v12.4.3), Windows 11 Business
on a Postman collection converted to use native git, run a test that uses a datafile on Postman cloud for comparison
create and checkout a branch in the associated git repo, and switch to that branch locally on the Postman desktop app
run the same tests and use same datafile
Observe that the pre-request script appears to go through twice. On other test runs, this has caused failures in other tests which rely more heavily on the pre-request script to set up our test scenario.
We have pre-request scripts at the folder and collection level as well that hold shared functions and constants. We did update the tests to not call anything in those pre-request scripts to see if there was any change in behaviour, but the issue still persists.
Wondering if anyone else is experiencing this or maybe help looking at possible causes.
Thank you for your follow up. It is working now with the example above. I did run latest against a more complex data driven collection and noticed some minor discrepancies in behaviour.
(So with the example I used above it was working.)
Example below does make use of functions in the pre-request script, I previously mentioned.
Postman v12.5.4
Postman Cloud:
highlighted is the output we would normally see in our execution
we did notice that only console.log outputs not being displayed are created from our shared functions located in the pre-request script at the collection level
However, I’m not too fussed about whether or not we can display console output from the pre-request scripts, especially it is working functionally and the changes will eventually make it to Postman Cloud (an entirely different issue we’re encountering). I did think we should highlight that there are still some discrepancies being observed in case it is indicative of anything else.