question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Integer environment variables resolve to null

See original GitHub issue
  1. Newman Version: 3.9.3
  2. OS details (type, version, and architecture): macOS
  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: It used to work once 😃

When setting an environment variable in the pre-request script:

pm.environment.set("foo", 0);

It is not sent in the request body:

{
	"x": {{foo}}
}

Steps to reproduce the problem:

  1. Import the collection in Postman: https://www.getpostman.com/collections/ce1ec4ed4a3c117a7448
  2. Run the tests, all is green
  3. Run with newman: newman run https://www.getpostman.com/collections/ce1ec4ed4a3c117a7448
  4. Test fails

Kind of similar with #1431

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
kunagpalcommented, May 25, 2018

@MarkSonghurst @vdespa @DieGraueEminenz @BarbaraGoeller-AIT @etspaceman Could you try this with Newman v3.9.4 and confirm that it works correctly?

1reaction
kunagpalcommented, May 22, 2018

@MarkSonghurst Thanks for chipping in, this bug will be fixed with the next release.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Optional environment variables in Spring app
First, if SOME_ENV_VARIABLE is not found when application.properties is being processed, its value becomes the string literal "#{null}". Then, @ ...
Read more >
Env Variable Operators - yq - GitBook
These operators are used to handle environment variables usage in expressions and documents. ... myenv="cat meow" yq --null-input '.a = env(myenv)'.
Read more >
CEEENV—Process environmental variables
CEEENV processes environment variables depending on the function code passed in as input. Based on the input to this function, CEEENV can do...
Read more >
Environment Variable Processors
The main issue of env vars is that their values can only be strings and your application may need other data types (integer,...
Read more >
Environment Variables
The value of an environment variable is a string of characters. ... are considered to end with a null byte and the total...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found