-
Notifications
You must be signed in to change notification settings - Fork 538
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
Suggestion: add random data generation helpers #606
Comments
Hi, yes we plan to update the templates with expressions to add dynamic behavior. We have not settled on a syntax now (we’re currently rewriting our parser to support future uses cases) and this is directly in our roadmap of things to add. We’ve an issue about date support for templates, that has some ideas for syntax => #312 You’re welcome to add your use case and syntax proposition in the comments of this issue, so we take these into account. We definitively need more inputs and discussion before starting implementation. |
Hi @icepuma we've introduced functions in Hurl 6.0.0
When run, the request body will be:
We can expand functions for generating random number or string now, depending on the needs. |
I guess it does not satisfy, it still cant create own behavior, or the documentation is not clear on how to use it? |
Hi @allestaire I don't understand your comment. Actually, in Hurl 6.0.0, the only function that can produce random data is |
Ahhh I see, thats sad, In my case, I wanted to select random item from an array which could not be done. |
Hey folks,
awesome tool you wrote here!
As I use the tool for setting up demo data for my projects, I would find it cool to have a small set of helpers to e.g. create a random email or a random alphanumeric user name.
Those helpers could be used like:
I know that I could use the
--variables
functionality to inject variables and generate the random data outside ofhurl
, but I think this could come in handy for having self-contained.hurl
- files.If you like this idea or have more input, I would be happy to contribute the code myself! I wanted to let you guys know first and discuss it before I go for it!
Best regards
Stefan
The text was updated successfully, but these errors were encountered: