Skip to content

Functions for random data generation #3720

Description

@AntonShuvaev

Problem to solve

I want to be able to use random data in requests like first name, last name, email, etc. Currently, we're limited to only newUuid and newDate functions.

Proposal

It would be great to have more random data generation functions besides existing newUuid and newDate. As an example, Postman has a great set of dynamic variables powered by faker.js (see docs: https://learning.postman.com/docs/tests-and-scripts/write-scripts/variables-list/). The fake-rs library (https://github.com/cksac/fake-rs) could be used for implementation.

I think it would be convenient to prefix such functions with $ to separate them from usual variables, as this is common in many API clients. For some functions, it would be even better to support arguments (e.g., $randomInt(123), $randomAlphaNumeric(10)). Or even support expressions so we can do things like this {{$randomFirstName + ' ' + $randomLastName}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions