We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
How to use environment variables in hurl files?
Explicitly by prefixing your variables with env
for example
GET {{env.url}}
The text was updated successfully, but these errors were encountered:
We will use another option (suggested by @tbolon in #290)
Variables in Hurl will be set by default from environment variables HURL_xxx.
$ echo 'GET {{url}}' | hurl error: Undefined Variable --> -:1:7 | 1 | GET {{url}} | ^^^ You must set the variable url |
$ export HURL_url=http://google.com $ echo 'GET {{url}}' | hurl <HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8"> <TITLE>301 Moved</TITLE></HEAD><BODY> <H1>301 Moved</H1> The document has moved <A HREF="http://www.google.com/">here</A>. </BODY></HTML>
And they can be overriden by the the command-line option --variable.
--variable
$ echo 'GET {{url}}' | hurl --variable "url=toto" error: Http Connection --> -:1:5 | 1 | GET {{url}} | ^^^^^^^ (6) Could not resolve host: toto |
This is similar to setting the proxy from environment variable http_proxy or command-line option --proxy.
http_proxy
--proxy
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
How to use environment variables in hurl files?
option 1
Explicitly by prefixing your variables with env
for example
The text was updated successfully, but these errors were encountered: