intuit / judo

Judo is an easy-to-use Command Line Interface (CLI) Integration Testing Framework, driven from a simple yaml file that also contains assertions.
Other
51 stars 21 forks source link

Feature: environment variable support #56

Open worldjoe opened 2 years ago

worldjoe commented 2 years ago

Feature Request:

the yaml/json files have no way to declare environment variables that are used for the commands. I tried adding a prerequisite line of set foobar=barfoo but the command doesn't inherit that. Instead it uses whatever foobar was set from the calling shell.

Would be nice if an environment variable could be set. Maybe a new section called "environment" and you can have key value pairs. Or maybe like I tried above, the prerequisites set calls would be repurposed by the command(s).

The first option could be passed along to the executor via the opts and sent down to spawn: https://nodejs.org/api/child_process.html#child_processspawncommand-args-options

tasneemkoushar commented 11 months ago

@worldjoe is this issue still open?