-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[feature] Adding environment variable support using helper functions #643
Comments
Support for environment variables is already added in #641, the template would look like the following one:
|
@toufik-airane this is now supported with the release of v2.4.3, you just need to add Example template:- id: env-example
info:
name: ENV Template
author: pdteam
severity: info
requests:
- method: POST
path:
- "{{BaseURL}}/apps"
body: username={{USER}}&password={{TOKEN}}
matchers:
- type: word
words:
- "Logged in"
Additionally, you can also define these variables via CLI as well using the newly introduced For example:-
|
Big! 🤩 |
Hi @ehsandeep Can we use env vars in matchers ? If no, what do you think about it ? Thanks! |
@savushkin-yauheni that is something we intend to support, GH issue for it - #555 |
Is your feature request related to a problem? Please describe.
For regression testing and authenticated tests, it's helpful to read system variables to replace values into templates at run time.
for example:-
Describe the solution you'd like
Result into:-
The text was updated successfully, but these errors were encountered: