-
Notifications
You must be signed in to change notification settings - Fork 528
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
Flag for persisting variables #2084
Conversation
Add --persist flag which will result in changed variables being saved to the variables-file.
Hi @agraven, Thanks for proposing this PR! For the moment, I'll postpone this PR: to address this feature, we're thinking about implementing --write-out from curl. This feature would be used to change the default sdtout: usually the last HTTP response is outputed from Hurl. If you want to output the HTTP server header instead of the response:
When run: $ hurl foo.hurl
Server: Flask We think about adding I just need to confirm with the others two maintainers what we want to do (@fabricereix @lepapareil ) |
The limitation of what the approach you're suggesting, assuming I've understood it correctly, is that you can't keep a persistent environment across multiple files in a single invocation. In other words, it's possible to do |
Yes, but we also prepare works for long standing issues on running Hurl file in parallel (see the first issues on Hurl that we want to address #87 #88). With theses features, we want to be able to run:
For the moment, in the code, there is no mutable state between files execution. We need to, at most possible, limit the shared state between files executions so implementing parallel runs will be easier. That's why we're cautious on these features (even if there are important). |
@agraven if you care a lot about persisting values in between: Then you just use hurl to save x - y and then later you retrieve it again with hurl by doing a get and capture the value. You can even wait by retrying to get the value to start certain tests. I composed it with "just runner":
|
📆 This PR has been closed because there is no activity (commits/comments) for more than 30 days 😥. Feel free to reopen it with new commits/comments. |
Add --persist flag which will result in changed variables being saved to the variables-file.
While it works in practice, I have yet to test how this handles any edge cases, and this more serves as a general outline for an implementation approach. I'll happy polish this further if there's maintainer interest in this approach.
Relates to #1208 and #1977