Orange-OpenSource / Orange-OpenSource/hurl

Suggestion: add random data generation helpers

Open
#606 5 comments 15 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement topic: generators
Dominant language
Rust
Stars
19.2k
Forks
745
Avg merge
5h 3m
Merged PRs (30d)
60

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing --variables functionality and how .hurl files process template expressions. Define the supported random helpers and their output constraints, then determine the tests needed for examples such as random_alphanumeric(12) and random_int(); done means the helpers work in self-contained .hurl files.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.