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.

Allow the specification of collection variables / local variables via the command line

See original GitHub issue

Allow the specification of collection variables via the command line, just like it currently works for the environment and global variables.

--collection-var "foo=bar"

--local-var "foo=bar"

In this way, more variable scopes could be controlled or overridden using the CLI.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:7
  • Comments:22 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
shamasiscommented, Mar 8, 2020

The more I see the need to override variables … started with none, then we added globals, then environment and now there’s a need for collection variable overrides. Let’s take a deeper look to see product-wise if we are missing something that we need to build in a wholistic way.

So, what are the use cases or jobs that we want to do here where overdriving collection variables appear to be a solution?

One interesting thought is that this may be showing us the need to expose “session” as a first class citizen in newman as well. Postman has this in form of initial value / current value of variables … same may need to be exposed for all variables in Newman.

2reactions
universalhandlecommented, Aug 16, 2021

@vdespa: pm.variables.get() behaves as you described. I was able to drop the || logic from my scripts. Thanks again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can we send environment variable value while running ...
Allow the specification of collection variables via the command line, just like it currently works for the environment and global variables.
Read more >
13.7.4.1 SET Syntax for Variable Assignment
SET syntax for variable assignment enables you to assign values to different types of variables that affect the operation of the server or...
Read more >
Newman + Postmant Specify a single environment variable ...
--global-var <value> Allows the specification of global variables via the command line, in a key=value format.
Read more >
3.21 Environment Variables Affecting GCC
Environment Variables (Using the GNU Compiler Collection (GCC)) ... localization information which allows GCC to work with different national conventions.
Read more >
Input Variables - HCL Configuration Language | Packer
Input variables may have defaults, but those defaults can be overridden from the command line or special variable files. Local variables can be...
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