postmanlabs / newman

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

"newman --export-globals" variables does not get updated (overrides) with latest Values on the existing Global Variables file #3017

Open syedjunaid123 opened 2 years ago

syedjunaid123 commented 2 years ago
  1. Newman Version: 5.3.2

  2. OS details (type, version, and architecture): MacBook Pro - M1

  3. Are you using Newman as a library, or via the CLI? : CLI

  4. Did you encounter this recently, or has this bug always been there: Trying this flow the first time.

  5. Expected behavior: I am Expecting that after the collection is run completely, then the --export-global should get overridden by the existing file which is saved with the same name. So that it would be easy to run on the next iteration.

  6. Command/script used to run Newman: newman run collections.postman_collection.json -e env.postman_environment.json -g globals.postman_globals.json --export-globals ./globals.postman_globals.json -r htmlextra --reporter-htmlextra-export ./TestReport.html

If you would notice, then you see that "globals.postman_globals.json" and "--export-globals ./globals.postman_globals.json" have the same file name, and I was expecting that the Initial Values would get persists with the current values and the Values would override. but, this didn't happen.

However, I would like to say that if the file name is changed then everything would be working as expected.

Note: This is also same behaviour for --export-collectionsand --export-enviroments.

Vlada-Z commented 1 year ago

Hey guys, any updates on this issue ?