Skip to content

Data Generation

Generating Data for Form Commands

AireAssert allows you to generate data when setting values for form controls.

Generation is available for the following commands:

gherkin
When we set 'control' to {Generate:name:findName}
When we set 'control' in iteration 2 of 'repeat-control' to {Generate:name:findName}

You can also set the locale of the command:

{Generate:name:findName:en_GB}

Cheatsheet

Names

SyntaxDescriptionExample
{Generate:name:findName}Generates a full nameKevin Sporer
{Generate:name:firstName}Returns a first nameKevin
{Generate:name:lastName}Returns a last nameSporer
{Generate:name:gender}Returns a genderMale, Female
{Generate:name:jobArea}Generates a job areaInfrastructure
{Generate:name:jobDescriptor}Generates a job descriptorCustomer
{Generate:name:jobTitle}Generates a job titleGlobal Accounts Engineer
{Generate:name:jobType}Generates a job typeDesigner
{Generate:name:prefix}Returns a name prefixMr., Mrs.

Company

SyntaxDescriptionExample
{Generate:company:companyName}Generates a company nameZieme, Hauck and McClure
{Generate:company:companySuffix}Generates a company suffixLLC, and Sons

Lorem

SyntaxDescriptionExample
{Generate:lorem:sentences}Generates sentencesDeserunt porro nulla id vero perspiciatis nulla.
{Generate:lorem:slug}Generates slugified textunde-deserunt-porro
{Generate:lorem:word}Generates a wordtemporibus

Random

SyntaxDescriptionExample
{Generate:random:word}Returns random wordSeamless

Internet

SyntaxDescriptionExample
{Generate:internet:color}Generates a random CSS hex color code#464c5b
{Generate:internet:domainName}Generates a domain namemuddy-neuropathologist.net
{Generate:internet:domainSuffix}Generates a domain suffixcom
{Generate:internet:domainWord}Generates a domain wordclose-reality
{Generate:internet:email}Generates a random emailLarry_Ratke85@yahoo.com
{Generate:internet:httpMethod}Generates an HTTP methodDELETE
{Generate:internet:ip}Generates a random IPv4 address140.151.183.216
{Generate:internet:password}Generates a random passwordUYdqZrTqIEJuENl
{Generate:internet:url}Generates a random URLhttps://remarkable-hackwork.info
{Generate:internet:userName}Generates a random usernameKatelynn_Medhurst60

Finance

SyntaxDescriptionExample
{Generate:finance:account}Generates a random account number55786858
{Generate:finance:accountName}Generates a random account nameHome Loan Account
{Generate:finance:amount}Generates a random amount548.81
{Generate:finance:bic}Generates a random BICPSVOTDO1
{Generate:finance:creditCardCVV}Generates a credit card CVV537
{Generate:finance:creditCardNumber}Generates a credit card number5020868584663428091
{Generate:finance:currencyCode}Generates a currency codeMUR
{Generate:finance:currencyName}Generates a currency nameUS Dollar
{Generate:finance:iban}Generates a random IBANTR736918640040966092800056

Bad Content

SyntaxDescriptionExample
{Generate:badContent:xml}Generates invalid XML
{Generate:badContent:json}Generates invalid JSON<to/>abcd</to>