Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The bail flag does not work with exportGlobals #3170

Open
bdlee420 opened this issue Oct 23, 2023 · 0 comments
Open

The bail flag does not work with exportGlobals #3170

bdlee420 opened this issue Oct 23, 2023 · 0 comments

Comments

@bdlee420
Copy link

I would expect the exportGlobals function to work even if the bail flag is triggered. Is this a bug? Or expected behavior?

  1. Newman Version (can be found via newman -v): 6.0
  2. OS details (type, version, and architecture): Windows 10 Enterprise
  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: First time trying, so can't confirm if it is new
  5. Expected behaviour: I would expect Globals to be exported even if the BAIL flag is triggered
  6. Command / script used to run Newman:

var newman = require("{{NewmanPath}}");

newman.run({
insecure: true,
bail: true,
collection: "C:\some-collection.json",
globals: require("C:\globals.json"),
exportGlobals: ""C:\globals-export.json"",
environment: require("C:\some-environment.json")

Steps to reproduce the problem:

  1. Create a collection
  2. Add request that writes to a Global Variable
  3. Add request that FAILS a test
  4. Run collection with BAIL and EXPORTGLOBALS, and see the global variable is not written
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant