mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 09:16:03 +03:00
[GH-ISSUE #2333] [feature]: @hoppscotch/cli should support environment variables exported from the GUI #799
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#799
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @ZacHarroldC5 on GitHub (May 11, 2022).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/2333
Originally assigned to: @devblin on GitHub.
Is there an existing issue for this?
Summary
The @hoppscotch/cli NPM package doesn't support bringing in environment variables as used in the GUI. The CLI tool should allow for passing an optional environment JSON file as well as a collections JSON file. Syntax would probably be of the form:
Why should this be worked on?
This is a major issue in my opinion as things like bearer tokens, base URLs, etc., should ideally be stored as environment variables for reuse within all tests. In my current API testing, exported collections are failing due to every request being designed around something like:
A base URL variable wouldn't be hard to manually unwrap into my tests, but something like bearer tokens, user IDs, etc. would be useful to get directly from the environment file.