Skip to content

Random Data Steps

Beginners: start with Template Steps if you still need the authoring context first. This page is the exact random-data reference.

Source: src/tests/steps/actions/random_data.step.ts.

See shared placeholder rules in Step Parameter Conventions.

Prefer installing published steps with npx appraisejs@latest add step ... instead of adding the package to your project with npm install.

Use random-data steps when the scenario needs throwaway values without hard-coding test data in the case itself.

All random-data steps share one parameter:

ParameterRepresentsExpected data
{string}Variable key to store generated valueNew/existing variable name (for example generatedEmail).
Terminal window
npx appraisejs@latest add step random-data/generate-random-first-name-and-save-in-variable
npx appraisejs@latest add step random-data/generate-random-last-name-and-save-in-variable
npx appraisejs@latest add step random-data/generate-random-email-and-save-in-variable
npx appraisejs@latest add step random-data/generate-random-password-and-save-in-variable
npx appraisejs@latest add step random-data/generate-random-phone-and-save-in-variable
npx appraisejs@latest add step random-data/generate-random-address-and-save-in-variable
npx appraisejs@latest add step random-data/generate-random-unique-text-and-save-in-variable
npx appraisejs@latest add step random-data/generate-random-full-name-and-save-in-variable
SignatureGenerated valueExample
the user generates a random first name and stores it inside the variable {string}First name stringWhen the user generates a random first name and stores it inside the variable "firstName"
the user generates a random last name and stores it inside the variable {string}Last name stringWhen the user generates a random last name and stores it inside the variable "lastName"
the user generates a random email and stores it inside the variable {string}Email stringWhen the user generates a random email and stores it inside the variable "generatedEmail"
the user generates a random password and stores it inside the variable {string}Password-like stringWhen the user generates a random password and stores it inside the variable "generatedPassword"
the user generates a random phone and stores it inside the variable {string}Phone stringWhen the user generates a random phone and stores it inside the variable "generatedPhone"
the user generates a random address and stores it inside the variable {string}Address stringWhen the user generates a random address and stores it inside the variable "generatedAddress"
the user generates a random unique text and stores it inside the variable {string}Unique text tokenWhen the user generates a random unique text and stores it inside the variable "uniqueSlug"
the user generates a random full name and stores it inside the variable {string}Full name stringWhen the user generates a random full name and stores it inside the variable "fullName"
  • Generated values are available to later steps through stored-variable access.
  • Missing or invalid variable key usage can cause downstream step failures.