Skip to content

Suggestion: add random data generation helpers #606

Open
@icepuma

Description

@icepuma

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:

# Create a new doggy thing with JSON body:
POST https://example.org/api/dogs
{
    "id": 0,
    "name": "{{random_alphanumeric(12)}}",
    "picture": "images/scottish-terrier.jpeg",
    "age": {{random_int()}},
    "breed": "Scottish Terrier",
    "location": "Lisco, Alabama"
}

I know that I could use the --variables functionality to inject variables and generate the random data outside of hurl, 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions