Replies: 6 comments 8 replies
-
Don't hesitate to add comments! |
Beta Was this translation helpful? Give feedback.
-
In my opinion, it depends if we consider the What are the users using more often as override, the Options in the file, or the CLI argument. For example, in the AWS CLI (see docs), the CLI arguments have the highest precedence, and local configuration files or env variables are lower. But, hardcoded credentials in any code using the AWS SDK also has higher precedence than any of these options. To me, the |
Beta Was this translation helpful? Give feedback.
-
Here is an example for which the current behavior might not seem consistent. Let's take the following Hurl file
We can also explicit set the
It has exactly the same semantics, and therefore has the same behaviour.
So far, so good. With the first Hurl file, it works but not with the second.
|
Beta Was this translation helpful? Give feedback.
-
I'm adding another example relating to the color. If I want to run a bunch of Hurl files in my terminal w/o color, I would expect that I could use the environment variable Also, when the error/output stream is redirected (this is probably always the case in a CI), the color is usually disabled (jq or Hurl default behavior). |
Beta Was this translation helpful? Give feedback.
-
Let's go back to the original example and apply it to a real-world example.
Team's members/executors want to be able to run it on their workstations from different proxies:
I choose to define bot-proxy as the default proxy in commited file:
What is the best solution to achieve different human team members needs ?
or
The second appears more natural and less complex to me. We must differentiate between hurl file writer and hurl file executor. As the executor, if I intentionally use the --proxy or --noproxy, it's because I naturally expect it to override proxy value for this execution (have to comply with my exec env constraints), why else would I write it ? In this example, if I had choosen the use vpn-proxy as default proxy, then i should have to script an infile sed before executing hurl with my automated supervisor instead of just executing hurl with --proxy and --noproxy option. And to fully address the original problem, if I wanted to test another url that needs different proxy, still having default values, then I will probably choose to use a variable instead of hard coding proxy value for each request :
And then:
Again, expecting the client variable to override the variable infile. The variable-based solution is even more preferable if there are not just 1 but several hurl files with this problem. Imagine having to replace inline hundreds of files, depending of the executor env ? Finally, isn't the question = Do we want to be able to have default values and final values (default commited on file, final by execution) or just final values (final value commited on file and not overridable by cli) ? |
Beta Was this translation helpful? Give feedback.
-
Using a mechanism like variable expansion could be a reasonable solution to meet all our needs:
example, with this test.hurl file:
will result on:
|
Beta Was this translation helpful? Give feedback.
-
[Options]
section can be used to set an option on a particular request inside a Hurl file:Question: what do you prefer to be the final value of the option when there is an option on the command line and in an
[Options]
section ?With this file
test.hurl
With this command line:
6 votes ·
Beta Was this translation helpful? Give feedback.
All reactions