Expressions

VIVIDUS provides a set of pre-defined expressions. Also plugins may define own expressions (they are documented in the corresponding plugins articles).

The expression parameters marked with bold are mandatory.

Data generation

generate

Generate expression allows to create various types of data using Datafaker library.

#{generate(<expression>)}
  • $expression - data type from the chosen data provider. Specify its name, desired method and required parameters to get data you want

Let’s see the structure of the expression for the following example:

#{generate(Internet.password '5', '10', 'true')}
#{generate                                       (1)
          (Internet                              (2)
                   .password                     (3)
                             '5',                (4)
                                  '10',          (4)
                                        'true')} (4)
1 Generate expression itself;
2 Data provider from the list. In this case - Internet. Click on its name to see the methods it contains;
3 One of the available methods within Internet data provider - password. There are multiple choices, we picked the fourth one;
4 Available parameters for the chosen method;

There are three of them:

  • int minimumLength - minimum number of symbols;

  • int maximumLength - maximum number of symbols;

  • boolean includeUppercase - true or false for Uppercase usage;

In this way we created an expression that generates a password from 5 to 10 characters length including uppercase letters.
Possible output is 51gVj5aLZY

Below you can find a list of examples. Please keep in mind, that the list is not full, all the expressions you can find here.
On the DataFaker site click on the data provider name to see available methods and required parameters.
Generate expressions
Expression #{generate(<expression>)} Result

Address.state

Louisiana

Address.country

Antigua and Barbuda

Address.streetAddressNumber

930

Address.streetAddress

1197 Roob Lane

Address.streetAddress 'true'

94448 Turner Mount Apt. 098

Address.secondaryAddress

Apt. 471

Address.zipCodePlus4

86241-1551

Address.zipCodeByState 'CA'

900##

Address.countyByZipCode '85038'

Maricopa

Address.streetSuffix

Groves

Address.streetPrefix

xx

Address.countryCode

PF

Address.buildingNumber

763

Address.fullAddress

Apt. 578 075 Marcelino Harbors, South Ginger, CT 39330

Address.streetName

Scarlet Ridge

Address.zipCode

30158

Address.postcode

18924

Address.stateAbbr

NH

Address.citySuffix

side

Address.cityPrefix

Port

Address.city

East Novellaburgh

Address.cityName

Binsborough

Address.latitude

23.972085

Address.longitude

-1.1987115

Address.timeZone

Asia/Singapore

Address.mailBox

PO Box 784

Ancient.god

Hestia

Ancient.primordial

Tartarus

Ancient.titan

Eurybia

Ancient.hero

Medea

Animal.name

clam

App.name

Latlux

App.version

4.9.5

App.author

Gorczany LLC

Appliance.brand

Bosch

Appliance.equipment

Appliance plug

Artist.name

Botticelli

Australia.locations

Rockhampton

Australia.animals

Skink

Australia.states

Western Australia

Avatar.image

Aviation.aircraft

B-25

Aviation.airport

MMLT

Aviation.METAR

METAR: ULAA 011400Z 17004MPS 120V220 9999 SCT030 18/06 Q1002 R08/190068 NOSIG RMK QFE750/1001

Aviation.flight 'value'

FX1683

Aviation.flight

CP4571

Aviation.airline

China Airlines

Aws.region

ap-south-1

Aws.albTargetGroupARN

arn:aws:elasticloadbalancing:us-east-2:0680298120:targetgroup/ysolowarm/b7222c8be8d10030

Aws.route53ZoneId

SUVXPKYWOGSKORDQGJPJA

Aws.securityGroupId

sg-9fc6094ccc9dfee8

Aws.accountId

0513429345

Aws.acmARN

arn:aws:acm:eu-west-2:0495334078:certificate/5810331f-5454-4f7a-af6a-4f5b481b2368

Aws.albARN

arn:aws:elasticloadbalancing:ap-east-1:0539386615:loadbalancer/app/bitwolf/b3ab7ab0a8b2dfc5

Aws.subnetId

subnet-e1c16bd84e0eb5df

Aws.vpcId

vpc-fcce248cb30efc18

Barcode.type

Monarch

Barcode.ean8

46308153

Barcode.gtin8

19380780

Barcode.gtin13

2690398358494

Barcode.ean13

7205757889394

Barcode.gtin14

79255513132254

Barcode.gtin12

105685246757

Basketball.positions

Small Forward

Basketball.teams

Chicago Bulls

Basketball.coaches

Jim Boylen

Basketball.players

Kevin Durant

Beer.name

Two Hearted Ale

Beer.style

Amber Hybrid Beer

Beer.hop

Fuggle

Beer.yeast

1762 - Belgian Abbey II

Beer.malt

Caramel

Book.title

Absalom, Absalom!

Book.publisher

Victor Gollancz Ltd

Book.author

Ms. Ian Wisoky

Book.genre

Classic

Bool.bool

false

Buffy.celebrities

Amber Tamblyn

Buffy.bigBads

The First Evil

Buffy.episodes

Something Blue

Buffy.characters

Rupert Giles

Buffy.quotes

When it’s really something that matters, they fight. I mean, they’re lame morons for fighting, but they do. They never— they never quit. And so I guess I will keep fighting, too.

Business.creditCardNumber

1234-2121-1221-1211

Business.creditCardType

diners_club

Business.creditCardExpiry

2015-11-11

Camera.brandWithModel

Sony Alpha 68

Camera.model

EOS M10

Camera.brand

Olympus

Cat.name

Millie

Cat.breed

Persian (Traditional Persian Cat)

Cat.registry

Fancy Southern Africa Cat Council

Code.asin

B0000DEVGP

Code.isbnRegistrant

06-807022

Code.isbnGs1

978

Code.isbnGroup

1

Code.isbn10 'true'

1-933875-57-7

Code.isbn10

0605841217

Code.isbn13 'true'

978-0-86500-277-7

Code.isbn13

9790088135329

Code.imei

356640146111425

Code.ean8

74223985

Code.gtin8

53924889

Code.gtin13

0805079505742

Code.ean13

3110269158262

Coin.flip

Tails

Color.name

ivory

Color.hex 'true'

#8F68FA

Color.hex

#3C35B0

Commerce.productName

Rustic Bronze Shirt

Commerce.promotionCode

DiscountStellar853664

Commerce.promotionCode '5'

DiscountAmazing87851

Commerce.department

Toys

Commerce.material

Granite

Commerce.price '10.0','10.0'

10.00

Commerce.price

2.41

Commerce.vendor

Target

Commerce.brand

GoPro

Company.name

Bashirian and Sons

Company.suffix

Group

Company.url

www.bailey-heller.io

Company.bs

drive 24/7 e-commerce

Company.catchPhrase

Centralized incremental hierarchy

Company.industry

Health, Wellness and Fitness

Company.profession

gardener

Company.buzzword

impactful

Company.logo

Country.name

Ecuador

Country.flag

Country.currencyCode

TWD

Country.currency

US Dollar

Country.countryCode2

vc

Country.countryCode3

sgp

Country.capital

Luxembourg

Currency.name

Ethiopian Birr

Currency.code

MZN

Demographic.educationalAttainment

Grade 1 though 11

Demographic.maritalStatus

Widowed

Demographic.race

Black or African American

Demographic.demonym

Grenadian

Demographic.sex

Female

Dessert.variety

Coffee Cake

Dessert.topping

Toffee Bits

Dessert.flavor

Red Velvet

Device.platform

Windows 10 Mobile

Device.manufacturer

Xiamomi

Device.modelName

Samsung Galaxy S5

Device.serial

tL&^J@24CVF=zP46Lxixk_a#=o6c5

Disease.internalDisease

Crohn disease

Disease.paediatrics

ancylostomiasis

Disease.gynecologyAndObstetrics

trichomonas vaginitis

Disease.dermatolory

bed sore

Disease.neurology

craniocerebral injury

Disease.surgery

rectal polyp

Disease.ophthalmologyAndOtorhinolaryngology

deflection of nasal septum

Dog.name

Pepper

Dog.size

medium

Dog.gender

female

Dog.sound

woof

Dog.memePhrase

thicc doggo

Dog.age

adult

Dog.coatLength

long

Dog.breed

English Setter

Domain.firstLevelDomain 'value'

value.travel

Domain.secondLevelDomain 'value'

value.moe.gy

Domain.validDomain 'value'

value.biz.pw

Domain.fullDomain 'value'

auto.value.cat.lv

Dune.character

Gaius Helen Mohiam

Dune.quote

A day comes when the potential Mentat must learn what’s being done. It may no longer be done to him. The Mentat has to share in the choice of whether to continue or abandon the training.

Dune.quote 'LETO'

On Caladan, we ruled with sea and air power. Here, we must scrabble for desert power. This is your inheritance, Paul.

Dune.title

Grand Patriarch

Dune.saying 'FREMEN'

Bless the Maker and all His Water. Bless the coming and going of Him, May His passing cleanse the world. May He keep the world for his people.

Dune.saying

Memory never recaptures reality. Memory reconstructs reality. Reconstructions change the original, becoming external frames of reference that inevitably fail.

Dune.planet

Geidi Prime

Educator.secondarySchool

Ostbarrow High School

Educator.university

Icelyn College

Educator.course

Bachelor of Design

Educator.campus

Flowerlake Campus

Esports.event

ESL Cologne

Esports.team

iBUYPOWER

Esports.league

GFinity

Esports.player

Boxer

Esports.game

CS:GO

File.fileName

eum_minus/repellat.png

File.fileName 'value','value','value','value'

valuevaluevalue.value

File.extension

css

File.mimeType

text/plain

Finance.nasdaqTicker

MDLZ

Finance.stockMarket

LSE

Finance.nyseTicker

KO

Finance.creditCard 'AMERICAN_EXPRESS'

3474-910020-61847

Finance.creditCard

3528-7835-9835-1003

Finance.bic

OWGFZVOQT0I

Finance.iban

CR30055293361286933805

Finance.iban 'BY'

BY38bX2U0214484zT51LE1Yi1fJm

Food.measurement

3 pint

Food.ingredient

Tamarillo

Food.spice

Anise

Food.dish

Pork Sausage Roll

Food.fruit

Fingerlime

Food.vegetable

Leeks

Food.sushi

Small amberjack

Friends.location

Ralph Lauren

Friends.character

Richard Burke

Friends.quote

You can’t have S-E-X when your taking care of the B-A-B-I-E.

Gender.types

NonBinary

Gender.binaryTypes

Male

Gender.shortBinaryTypes

m

Hacker.abbreviation

ADP

Hacker.adjective

haptic

Hacker.noun

application

Hacker.verb

bypass

Hacker.ingverb

bypassing

Hashing.md2

1ce11f29847445b115081e4cbbdf5391

Hashing.md5

dc1e357330656bd884c1dfded23b9375

Hashing.sha1

a2ca88c70f186f776d47802d21e0c98b9c0ec9ab

Hashing.sha384

b7c18cfb1ef0b73acbc92c30b55a00e7a7ad90ba9948a7d20f9c30ac6fae25a4de62630bd17d08f7a05907f2fdd74150

Hashing.sha256

d4e53a903fb372d58049c838647b306d2a540e7f93174fc45faecf3d2e3e20bd

Hashing.sha512

a0164fa7b1e895cd5aee8d78a82e194b5b000
3400eba12ceab05235454cf80485f93807d407
d0d6e9d9e4adc4b952300a05fd993a7754e8d1
34ec700c61a11c6

Hearthstone.mainProfession

Druid

Hearthstone.mainCharacter

Illidan Stormrage

Hearthstone.mainPattern

Wild

Hearthstone.battlegroundsScore

10612

Hearthstone.standardRank

Legend 37997

Hearthstone.wildRank

Silver 2

Hipster.word

keffiyeh

Hobbit.location

High Pass

Hobbit.character

Smaug

Hobbit.quote

May the hair on your toes never fall out!

Hobbit.thorinsCompany

Kili

Hobby.activity

Kitesurfing

Horse.name

Little Joe

Horse.breed

Poitevin Horse also called Mulassier

Internet.url

www.vito-witting.com

Internet.image

Internet.image '100','100','false','value'

Internet.domainSuffix

info

Internet.emailAddress

Internet.emailAddress 'value'

Internet.safeEmailAddress 'value'

Internet.safeEmailAddress

Internet.ipV4Address

75.216.35.241

Internet.getIpV4Address

/211.238.65.111

Internet.privateIpV4Address

192.168.191.54

Internet.getPrivateIpV4Address

/169.254.237.136

Internet.publicIpV4Address

79.226.37.26

Internet.getPublicIpV4Address

/191.190.144.144

Internet.ipV6Address

f715:8be5:ab67:6117:589a:af6a:babb:4b6d

Internet.getIpV6Address

/95da:c319:9d92:9ca4:e39a:19b5:8abf:658

Internet.userAgentAny

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A

Internet.slug

soluta_fuga

Internet.avatar

Internet.domainName

hodkiewicz.biz

Internet.domainWord

boyle

Internet.password '5','5','true','true'

B#N0D

Internet.password

huz0v6bupeu

Internet.password '5','5','true'

6DuU9

Internet.password 'true'

s1inkbwy6

Internet.password '5','5','true','true','true'

E7jF^

Internet.password '5','5'

88an0

Internet.macAddress 'value'

value:22:95:3f:85:14

Internet.macAddress

77:5d:38:33:16:4e

Internet.ipV4Cidr

139.58.116.17/21

Internet.ipV6Cidr

ea3b:a86a:d103:47c0:8406:b9e7:5c75:70fe/6

Internet.uuid

fd1df83b-97f3-4f1f-9521-6cb697193833

Internet.userAgent 'CHROME'

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36

Job.field

Marketing

Job.position

Technician

Job.title

Chief Community-Services Technician

Job.seniority

International

Job.keySkills

Communication

Kaamelott.character

Hervé de Rinel

Kaamelott.quote

A chaque fois que vous parlez de lui, à partir de maintenant, dans les écritures, vous l’appellerez…​Coco l’Asticot.

Kpop.iGroups

Roo’ra

Kpop.iiGroups

M.I.L.K

Kpop.iiiGroups

T-ara N4

Kpop.girlGroups

Bob Girls

Kpop.boyBands

Super Junior-M

Kpop.solo

Kim Hyung-jun

Lebowski.character

The Dude

Lebowski.quote

Is this your homework, Larry?

Lebowski.actor

John Turturro

Lorem.character 'true'

T

Lorem.character

x

Lorem.word

nesciunt

Lorem.fixedString '5'

Sit s

Lorem.maxLengthSentence '5'

Omnis

Lorem.words

hic, eligendi, consequatur

Lorem.words '5'

accusantium, ratione, quibusdam, quo, eligendi

Lorem.sentence

Velit ea voluptatem hic sapiente pariatur.

Lorem.sentence '5'

Unde numquam quas error qui fugit eligendi quia necessitatibus.

Lorem.sentence '5','5'

Laborum iusto ad quod atque sit.

Lorem.sentences '5'

Saepe facilis illo omnis itaque libero doloremque., Accusantium hic maiores qui modi consequuntur repellendus., Delectus commodi consequatur est aut architecto distinctio., Voluptas qui fugit voluptas debitis voluptatem non harum., Vel nihil aperiam recusandae et rerum.

Lorem.paragraph

Velit fuga ut dolor. Vel voluptas est. Rerum id vero et iusto ea modi. Voluptatibus quia rem ut veritatis voluptatibus. Veritatis est facere quia illo ut.

Lorem.paragraph '5'

Commodi dolorem nihil itaque quis. Modi ad debitis quo. Qui voluptatem non eius fugiat distinctio harum. Rem nesciunt velit voluptatem eligendi qui et ullam. Quibusdam dignissimos expedita ullam.

Lorem.paragraphs '5'

Ex sint ut sunt. Neque minima animi nesciunt accusamus. Consequatur magni provident eius. Ratione qui rerum eius tempora totam. Et esse aut nulla nisi., Doloremque ratione dolorem similique nesciunt iste aut. Et illum sunt expedita veniam. Distinctio quae sit eum possimus qui nobis. Deserunt perspiciatis quod aliquid in exercitationem. Magnam nihil rerum modi blanditiis dolor minus., Itaque placeat libero. Rem deleniti culpa unde officiis quam aut odit. Qui sapiente eos debitis quisquam voluptatem. Non ut sit. Unde maxime nam quaerat ipsum., Placeat qui nulla beatae ducimus. Aut ad laborum. Neque nemo sunt. Est quisquam voluptas. Rerum itaque sint voluptatem in sed et., Perferendis quibusdam voluptatem. Molestias aut ea voluptate quae dicta. Id molestiae et quo cum. Maiores aut eum perferendis et pariatur doloribus est.

Lorem.characters '5','5','true'

ruzpV

Lorem.characters '5','5','true','true'

zERxY

Lorem.characters '5','5'

z9alc

Lorem.characters '5','5','true','true','true'

&*C06

Lorem.characters

wlqbckt64396oezppbd4e2kzdf4zxxy7nnhkyy
8igy7gcqp5au7eyoc49kkmx9qwj1qacl9cpamwo
gpbl49mu9exw46tem3x7g3e4lqd0r4o13jxs5hb
8hchbzhhu64kgjicb6hn4tudhtbiwbsfes5ulyz
t4aoj16vr9vt8htjqtgqlnc5atlxzn8xinx6k7x
nkjir2oickhxi8kje1d1gosxygghnpll62yphjw
x9ahkhhc87wa035s2cmok8

Lorem.characters 'true'

4PYt199LmOUmMq1FkDgDIEC3MYGi8lSI9yJisS
9z5adq1ZF8I3NhhB0L2xQgMp4ZX49gGCaH7hypn
A8Phh83KMFnJ0T4K227EbdKZyUum6Hf6QBXCp41
4InFWhsW7wm2r3sz3knaLn28C6tBZAEQwn6R1bw
E544SgL1Ey0J502lcN0w1Ec92727han680kWUTV
oV6dLNrAvJUsTq9vNDR92JrvNtNMrUaBx427hlM
2621S12WjcJJUBCcw9t2X7

Lorem.characters '5','true','true'

Afb8k

Lorem.characters '5','true'

IAJLX

Lorem.characters '5','true','true','true'

kO08#

Lorem.characters '5'

y7fnw9ij9ar5z2q5g0m2fbyt8ndn9n21lcp9xa
de3maku0n7lsdoghkwo5vcswug8kbvu66o1ccle
e7d72zsukln7jllmwnabwap8hw51enen46jjaku
gr2fo86p7ok9i1qgm68dta02q5r9681zfr2vsow
owf2as2sss2q0qvra6l231t82x4utvfmnkj8pan
in7116ox9czycwz7ujxetk9hk9z1nqc4y8puiaq
sgslalay487oosw929re0y

Marketing.buzzwords

immersive experience

Matz.quote

Language designers want to design the perfect language. They want to be able to say, 'My language is perfect. It can do everything.' But it’s just plain impossible to design a perfect language, because there are two ways to look at a language. One way is by looking at what can be done with that language. The other is by looking at hoW we feel using that language-how we feel while programming.

Medical.medicineName

IVABRADINE HYDROCHLORIDE

Medical.diseaseName

Eye Problems

Medical.hospitalName

THEDACARE MEDICAL CENTER SHAWANO INC

Medical.diagnosisCode

W5

Medical.procedureCode

DdLVNRm

Medical.symptoms

Hives

Military.marinesRank

Sergeant Major of the Marine Corps

Military.airForceRank

Senior Master Sergeant

Military.dodPaygrade

O-6

Military.armyRank

Sergeant Major of the Army

Military.navyRank

Fireman Apprentice

Minecraft.monsterName

Witch

Minecraft.tileItemName

Beetroots

Minecraft.itemName

Leather Boots

Minecraft.tileName

Cyan Concrete Powder

Minecraft.entityName

Illusioner

Minecraft.animalName

Bat

Mood.feeling

horrified

Mood.emotion

calm

Mood.tone

satirical

Mountain.name

Kamet

Mountain.range

Batura Karakoram

Mountaineering.mountaineer

George Mallory

Music.key

Fb

Music.genre

Stage And Screen

Music.instrument

Flute

Music.chord

C#m7

Name.name

Mari Murphy

Name.prefix

Ms.

Name.suffix

DDS

Name.lastName

Waelchi

Name.fullName

Gala Schamberger

Name.nameWithMiddle

Gregorio Altenwerth Lindgren

Name.firstName

Amiee

Name.title

Global Infrastructure Designer

Name.username

johnie.harris

Name.bloodGroup

AB+

Nation.flag

🇪🇺

Nation.language

Arabic

Nation.nationality

Bosniaks

Nation.capitalCity

Taipei

Nation.isoLanguage

bh

Nation.isoCountry

LK

Nigeria.name

Bayo

Nigeria.celebrities

The Lady Motara

Nigeria.food

Afang

Nigeria.places

Itu

Nigeria.schools

AKSU

Number.digit

8

Number.digits '5'

43504

Number.negative

-340520378

Number.positive

99478957

Number.numberBetween '10','10'

10

Number.numberBetween '5','5'

5

Number.randomDigit

1

Number.randomDigitNotZero

4

Number.randomNumber '5','true'

73972

Number.randomNumber

1

Number.randomDouble '5','10','10'

10.0

Number.randomDouble '5','5','5'

5.0

Overwatch.location

Hanamura

Overwatch.quote

Activating Self Destruct Sequence.

Overwatch.hero

Zenyatta

Passport.chValid

E95855828

Passport.chInvalid

Y1PC

Passport.amValid

42652958

Passport.amInvalid

6H23

Photography.iso

52200

Photography.camera

Canon T70

Photography.brand

Praktika

Photography.lens

tele

Photography.genre

Panoramic

Photography.imageTag

show

Photography.aperture

f/0.87

Photography.shutter

15

Photography.term

DOF

Pokemon.name

Victreebel

Pokemon.location

Four Island

Relationships.parent

Mother

Relationships.direct

father

Relationships.any

Nephew

Relationships.extended

Nephew

Relationships.inLaw

Mother-in-law

Relationships.spouse

Husband

Relationships.sibling

Sister

Restaurant.name

?? Grill

Restaurant.type

Senegalese

Restaurant.description

SVIs mission is to deliver quality products at affordabl prices to our independent retailers, wholesalers and food service partners around the world by providing international procurement, distribution, marketing and supply chain management.

Restaurant.namePrefix

Blue

Restaurant.nameSuffix

Eatery

Restaurant.review

Great lattes and cold drinks as well. Nice to see a place carrying local coffee and products in Times Square! Excited to make it a part of my morning commute as it is much less crowded than the chain coffee shops around here.

Robin.quote

Holy Blackout

Science.element

Lawrencium

Science.elementSymbol

Pm

Science.scientist

Nicolaus Copernicus

Science.tool

Stereomicroscope

Science.quark

up

Science.leptons

tau neutrino

Science.bosons

gluon

Seinfeld.character

Jackie Chiles

Seinfeld.quote

See, this is what the holidays are all about. Three buddies sitting around chewing gum.

Seinfeld.business

Champagne Video

Shakespeare.hamletQuote

That it should come to this!.

Shakespeare.asYouLikeItQuote

For ever and a day.

Shakespeare.kingRichardIIIQuote

Now is the winter of our discontent.

Shakespeare.romeoAndJulietQuote

O! she doth teach the torches to burn bright.

Sip.method

BYE

Sip.messagingPort

4976

Sip.provisionalResponseCode

181

Sip.successResponseCode

202

Sip.redirectResponseCode

300

Sip.clientErrorResponseCode

485

Sip.serverErrorResponseCode

501

Sip.globalErrorResponseCode

600

Sip.provisionalResponsePhrase

Early Dialog Terminated

Sip.successResponsePhrase

OK

Sip.redirectResponsePhrase

Multiple Choices

Sip.clientErrorResponsePhrase

Loop Detected

Sip.serverErrorResponsePhrase

Message Too Large

Sip.globalErrorResponsePhrase

Does Not Exist Anywhere

Sip.nameAddress

<sip:Otilia@214.27.76.234:4403>

Sip.rtpPort

42736

Sip.bodyString

v=0
o=Glady 3e74a03d-a63d-40a1-b73b-909d34ecdcf6 IN IP4 nicolas.biz
s=-
c=IN IP4 104.176.185.245
t=0 0
m=audio 43196 RTP/AVP 0
a=rtpmap:0 PCMU/8000

Sip.bodyBytes

[B@1c7159d5

Sip.contentType

multipart/related

Size.adjective

tall

Space.starCluster

Djorgovski 1

Space.constellation

Pisces

Space.agencyAbbreviation

CNES

Space.nasaSpaceCraft

Enterprise

Space.distanceMeasurement

101megaparsecs

Space.company

NASA Jet Propulsion Laboratory

Space.planet

Mars

Space.moon

Moon

Space.galaxy

Pinwheel

Space.nebula

Eagle Nebula

Space.star

Vega

Space.agency

European Space Agency

Space.meteorite

Sayh al Uhaymir 169

Stock.nsdqSymbol

MFRI

Stock.nyseSymbol

EDD

Subscription.paymentMethods

Paypal

Subscription.subscriptionTerms

Triennal

Subscription.paymentTerms

Annual

Subscription.plans

Silver

Subscription.statuses

Active

Superhero.name

Bishop XI

Superhero.prefix

Agent

Superhero.suffix

Spirit

Superhero.descriptor

She-Thing

Superhero.power

Hydrokinesis

Tea.type

White

Tea.variety

Rougui

Team.name

Oklahoma ants

Team.state

Connecticut

Team.creature

geese

Team.sport

golf

Touhou.characterName

Soga no Tojiko

Touhou.characterFirstName

Suika

Touhou.characterLastName

Mai

Touhou.trackName

Peaceful Romancer

Touhou.gameName

Double Dealing Character

Tron.location

I/O Tower

Tron.character

bit

Tron.character 'PROGRAM'

Clu

Tron.quote

All Programs have a desire to be useful. But in moments, you will no longer seek communication with each other, or your superfluous Users. You will each be a part of me. And together, we will be complete.

Tron.quote 'BIT'

No.

Tron.alternateCharacterSpelling 'CLU'

clue

Tron.alternateCharacterSpelling

alan

Tron.vehicle

Light Cycle

Tron.game

Matrix Blaster

Tron.tagline

In the future video games battles will be a matter of life and death.

Twitter.userName

Alphazap

Twitter.twitterId '5'

90875

Twitter.userId

15000010

Twitter.getLink 'value','5'

University.name

Western Dare Institute

University.prefix

South

University.suffix

Institute

Vehicle.make

Chevy

Vehicle.color

Beige

Vehicle.style

ESi

Vehicle.manufacturer

Maybach

Vehicle.makeAndModel

Ford F150

Vehicle.transmission

Automatic

Vehicle.standardSpecs

Acoustic glass windshield, High performance suspension, Monotone paint, Reversible/waterproof cargo storage, Dual front & rear cup holders, Rain-sensing wipers, Body color front license plate brow, Fixed long mast antenna

Vehicle.standardSpecs '5','5'

1-piece chrome window surround, Pwr tilt/slide moonroof -inc: 1-touch open/close, Highline door trim panel, Water-repellent windshield & front door glass, Rear door child safety locks

Vehicle.licensePlate 'value'

???-####

Vehicle.licensePlate

wpw-5608

Vehicle.model

X5

Vehicle.make

Toyota

Vehicle.model 'Toyota'

Prius

Vehicle.vin

NPW1P2SDJBZN42191

Vehicle.driveType

FWD

Vehicle.fuelType

Compressed Natural Gas

Vehicle.carType

Minivan

Vehicle.engine

8 Cylinder Engine

Vehicle.carOptions '5','5'

A/C: Front, Airbag: Passenger, Power Seats, Alarm, Antilock Brakes

Vehicle.carOptions

Power Windows, Antilock Brakes, Tinted Glass, A/C: Front, AM/FM Stereo, Antilock Brakes, CD (Single Disc), Tow Package

Vehicle.doors

1

Volleyball.position

Setter

Volleyball.team

VfB Friedrichshafen

Volleyball.player

Sheilla Castro

Volleyball.coach

Aleksander Skiba

Volleyball.formation

4-2

Weather.description

Partly cloudy

Weather.temperatureCelsius '5','5'

5°C

Weather.temperatureCelsius

38°C

Weather.temperatureFahrenheit '5','5'

5°F

Weather.temperatureFahrenheit

2°F

Witcher.location

Vizima

Witcher.sign

Igni

Witcher.character

Aelirenn

Witcher.quote

No Lollygagin'!

Witcher.book

Time of Contempt

Witcher.witcher

Auckes

Witcher.school

Cat

Witcher.monster

Ghoul

Witcher.potion

Swallow

Yoda.quote

Around the survivors a perimeter create.

Zelda.character

Mayor Dotour

Zelda.game

Zelda II: Adventure of Link

letterify

Replaces ? symbols with latin letters.

#{generate(letterify '$input', '$isUpperCase')}
  • $input - any string containing ? symbols to be replaced with letters

  • $isUpperCase - boolean, set it to true for uppercase option

Table 1. letterify examples
Expression Result
#{generate(letterify 'test????test')}

testnjmytest

#{generate(letterify 'test????test', 'true')}

testXQBMtest

numerify

Replaces # symbols with numbers.

#{generate(numerify '$input')}
  • $input - any string containing # symbols to be replaced with numbers

Table 2. numerify example
Expression Result
#{generate(numerify 'test####test')}

test5862test

bothify

Combination of letterify and numerify.

#{generate(bothify '$input')}
  • $input - any string containing # and ? symbols to be replaced with numbers and letters accordingly

Table 3. bothify example
Expression Result
#{generate(bothify 'test#?#?#?#test')}

test2o7v0g9test

templatify

Replaces symbol mentioned in the second argument with one of the symbols mentioned after it.

#{generate(templatify '$input', '$whatToReplace', '$replacement1', '$replacement2', '$replacement3')}
  • $input - any string to process

  • $whatToReplace - part of the string to be replaced

  • $replacement - replacement to use. Possible to use multiple options

Table 4. templatify example
Expression Result
#{generate(templatify 'VIVIDUS', 'I', 'X', 'P')}`

VPVPDUS

VXVPDUS

VPVXDUS

VXVXDUS

examplify

Replaces symbols by example: uppercase with uppercase, digit with digit, lowercase with lowercase.

#{generate(examplify '$input')}
  • $input - any string to process

Table 5. examplify example
Expression Result
#{generate(examplify 'V1V1DUs')}

R9Q7VTq

regexify

Allows generating output based on regular expression.

#{generate(regexify '$regularExpression')}
  • $regularExpression - regular expression that describes desired output

Table 6. regexify example
Expression Result
#{generate(regexify '\d{3}\w{1}')}

409Y

#{generate(regexify '[A-Z]{3}[a-z]{4}[2-8]{5}')}

PQUlxdq66436

options

Returns any of provided items.

#{generate(options.option '$item1', '$item2', '$item3')}
  • $item - option to choose from

Table 7. options example
Expression Result
#{generate(options.option 'V','I','V','I','D','U','S')}

S

generate JSON

Generates JSON based on key-value pairs input.

#{generate(json '$key1', '$value1', '$key2', '$value2')}
Table 8. generate JSON example
Expression Result
#{generate(json 'first_name','Bob','last_name','Dylan','profession','singer')}
{"first_name": "Bob", "last_name": "Dylan", "profession": "singer"}

generate CSV

Generates comma-separated values based on input.

#{generate(csv, '$rowsNumber' '$columnName1', '$value1', '$columnName2', '$value2')}
  • $rowsNumber - number of rows to fill in

  • $columnName1 - name of the first column

  • $value1 - data to enter the first column

  • $columnName2 - name of the second column

  • $value2 - data to enter the second column

Table 9. generate CSV example
Expression Result
#{generate(csv '3', 'first_name','Bob','last_name','Dylan')}
"first_name","last_name"
"Bob","Dylan"
"Bob","Dylan"
"Bob","Dylan"

randomInt

Generates a random integer value between the specified origin (minInclusive) and the specified bound (maxInclusive).

#{randomInt($minInclusive, $maxInclusive)}
  • $minInclusive - the least value

  • $maxInclusive - the upper bound

Table 10. Examples of the expressions generating random integer value
Expression Result

#{randomInt(1, 10)}

An integer between 1 and 10

#{randomInt(100, 999)}

An integer between 100 and 999

#{randomInt(-5, 5)}

An integer between -5 and 5

#{randomInt(-5, -2)}

An integer between -5 and -2

#{randomInt(1, 1)}

1

Math calculations

round

Rounds a number with an approximate value based on specific rounding definitions.

#{round($value, $maxFractionDigits, $roundingMode)}
  • $value - any number to be processed

  • $maxFractionDigits - maximum number of digits after the decimal separator

  • $roundingMode - specifies a rounding behavior for numerical operations (more information here):

    Rouding Mode Readable Description

    UP

    up

    Rounds away from zero.

    DOWN

    down

    Rounds towards zero.

    CEILING

    ceiling

    Rounds towards positive infinity.

    FLOOR

    floor

    Rounds towards negative infinity.

    HALF_UP

    half up

    Rounds towards "nearest neighbor" unless both neighbors are equidistant, in which case round up.

    HALF_DOWN

    half down

    Rounds towards "nearest neighbor" unless both neighbors are equidistant, in which case round down.

    HALF_EVEN

    half even

    Rounds towards the "nearest neighbor" unless both neighbors are equidistant, in which case, round towards the even neighbor.

    UNNECESSARY

    unnecessary

    Asserts that the requested operation has an exact result, hence no rounding is necessary.

Table 11. Examples of rounding operations with different parameters
Expression Result

#{round(5.0)}

5

#{round(-5.9, 0)}

-6

#{round(5.551, 2)}

5.55

#{round(1.4, 0, ceiling)}

2

#{round(-1.4, 0, floor)}

-2

#{round(-5.5555, 3, half up)}

-5.556

#{round(-5.555, 2, half down)}

-5.55

#{round(-5.5, 0, half even)}

-6

#{round(-1.1, 2, unnecessary)}

-1.1

String manipulations

replaceFirstByRegExp / replaceAllByRegExp

Replaces the first / every substring of the input that matches the regular expression with the given replacement string.

Online tools like RegexPlanet or Regex101 can be used to test and debug regular expressions

#{replaceFirstByRegExp($regularExpression, $replacement, $input)}
#{replaceAllByRegExp($regularExpression, $replacement, $input)}
  • $regularExpression - the regular expression to match substring(s)

  • $replacement - the replacement string, it may contain references to captured substrings, e.g. $1 is a reference to the first group

  • $input - any string to be processed

The expression parameters containing commas or empty values must be surrounded with triple quotes: """
Description Expression Result

Extract ID from the string

#{replaceFirstByRegExp(product-(\d+), $1, product-86)}

86

Extract ID and build new string with it

#{replaceFirstByRegExp(/user/(\d+), author/$1, /user/21)}

author/21

Extract password from the string with comma

#{replaceFirstByRegExp(.*new password is (.*), $1, """Updated, new password is qwe123""")}

qwe123

Replace whitespaces with dashes

#{replaceAllByRegExp(\s, -, convert spaces to dashes)}

convert-spaces-to-dashes

Remove all numbers from the string

#{replaceAllByRegExp(\d, """""", a1b2c3d)}

abcd

toLowerCase

Converts an input string to lower case.

#{toLowerCase($input)}
  • $input - any string to be converted lower case

Table 12. Examples of the expressions converting strings to lower case
Expression Result

#{toLowerCase(aBc)}

abc

toUpperCase

Converts an input string to upper case.

#{toUpperCase($input)}
  • $input - any string to be converted upper case

Table 13. Examples of the expressions converting strings to upper case
Expression Result

#{toUpperCase(aBc)}

ABC

capitalizeFirstWord

Capitalizes an input string, changing the first character to title case. No other characters are changed.

#{capitalizeFirstWord($input)}
  • $input - any string to be capitalized

Table 14. Examples of the expressions capitalizing strings
Expression Result

#{capitalizeFirstWord(aBc)}

ABc

capitalizeWords

Capitalizes all the whitespace separated words in the input string. Only the first character of each word is changed.

#{capitalizeWords($input)}
  • $input - any string to be capitalized

Table 15. Examples of the expressions capitalizing words in the string
Expression Result

#{capitalizeWords(aBc dEf)}

ABc DEf

capitalizeWordsFully

Converts all the whitespace separated words in a String into capitalized words, that is each word is made up of a titlecase character and then a series of lowercase characters.

#{capitalizeWordsFully($input)}
  • $input - any string to be capitalized

Table 16. Examples of the expressions capitalizing strings
Expression Result

#{capitalizeWordsFully(aBc dEf)}

Abc Def

uncapitalizeFirstWord

Uncapitalizes an input string, changing the first character to title case. No other characters are changed.

#{uncapitalizeFirstWord($input)}
  • $input - any string to be capitalized

Table 17. Examples of the expressions capitalizing strings
Expression Result

#{uncapitalizeFirstWord(ABc)}

aBc

uncapitalizeWords

Uncapitalizes all the whitespace separated words in the input string. Only the first character of each word is changed.

#{uncapitalizeWords($input)}
  • $input - any string to be capitalized

Table 18. Examples of the expressions capitalizing words in the string
Expression Result

#{uncapitalizeWords(ABc DEf)}

aBc eEf

trim

Trims an input string (removes control characters (chars with code less than or equal to 32) from both ends).

#{trim($input)}
  • $input - any string to be trimmed

Table 19. Examples of the expressions trimming strings
Expression Result

#{trim( a b c )}

a b c

encodeToBase64

Encode the input string to Base64 format

#{encodeToBase64($input)}
  • $input - any string to be encoded to Base64 format

Table 20. Examples of the expressions encoding to Base64
Expression Result

#{encodeToBase64(vividus)}

dml2aWR1cw==

decodeFromBase64

Decodes the input string from Base64 format to the regular string

#{decodeFromBase64($input)}
  • $input - Base64 string to decode

Table 21. Examples of the expressions decoding Base64
Expression Result

#{decodeFromBase64(dml2aWR1cw==)}

vividus

toBase64Gzip

Compress the input string to GZip and encode compressed bytes to Base64 format

#{toBase64Gzip($input)}
  • $input - any string to be compressed and encoded

Table 22. Examples of the expressions compressing and encoding to Base64 GZip
Expression Result

#{toBase64Gzip(vividus)}

H4sIAAAAAAAAACvLLMtMKS0GANIHCdkHAAAA

escapeHTML

Escapes reserved characters in HTML string

#{escapeHTML($input)}
  • $input - any string to be escaped

Table 23. Escape HTML string
Expression Result

#{escapeHTML(M&Ms)}

M&Ms

escapeJSON

Escapes reserved JSON characters: converts any string into one that’s properly escaped for inclusion in JSON as a value.

#{escapeJSON($input)}
  • $input - any string to be escaped

Table 24. Escape JSON string
Expression Result

#{escapeJSON("abc"+"xyz")}

\"abc\"+\"xyz\"

quoteRegExp

Quotes the input literal so that metacharacters or escape sequences in the input sequence will be given no special meaning in regular expression.

#{quoteRegExp($input)}
  • $input - any string to be quoted

Table 25. Quote regular expression
Expression Result

#{quoteRegExp(Some(Value))}

\QSome(Value)\E

Example 1. Verify the data
Then `${frontEndData}` matches `#{quorePattern(${backEndData})}.*`

Hash calculations

calculateHash

Calculates the hash using the specified hashing algorithm

#{calculateHash($algorithm, $input)}
Table 26. Example of hash calculating for string using MD5
Expression Result

#{calculateHash(MD5, vividus)}

0a05ba6064ae7e5d6ee9818f85b666ad

calculateFileHash

Calculates the resource or file hash using the specified hashing algorithm

#{calculateFileHash($algorithm, $resourceNameOrFilePath)}
Table 27. Example of hash calculating for file using SHA-1
Expression Result

#{calculateFileHash(SHA-1, data/file.txt)}

0a05ba6064ae7e5d6ee9818f85b666ad

Resources

loadResource

Loads the resource by its name and replaces the expression with the content of the resource.

#{loadResource($resourceName)}
  • $resourceName - the name of the resource to load

Example 2. Load data from the project resource
When I initialize the scenario variable `my-data` with value `#{loadResource(/data/body.txt)}`

loadBinaryResource

Loads the resource by its name as bytes. It could be useful for the steps that accepting raw binary data.

#{loadBinaryResource($resourceName)}
  • $resourceName - the name of the resource to load

Example 3. Load data from the project resource as bytes
When I mock HTTP responses with request URL which CONTAINS `frames.html` using response code `200`, content `#{loadBinaryResource(page.html)}` and headers:
|name        |value    |
|Content-Type|text/html|

resourceToBase64

Finds the resource by its name and replaces the expression with the content of the resource in Base64 format.

#{resourceToBase64($resourceName)}
  • $resourceName - the name of the resource to load

Example 4. Load data as Base64 from the project resource
When I initialize the scenario variable `my-data` with value `#{resourceToBase64(/data/body.txt)}`

Script evaluation

eval

Evaluates JEXL script and converts result to a string.

#{eval($script)}
  • $script - valid JEXL script to be evaluated

  • Any Vividus variable is accessible in the JEXL script by its name

Example 5. Evaluate JEXL script
Scenario: Verify eval expression
Then `#{<expression>}` is = `<expected>`
Examples:
|expected          |expression                                                        |
|null              |eval(null)                                                        |
|28                |eval(16 + 2 * 6)                                                  |
|10                |eval(math:abs(-10))                                               |
|here              |eval(stringUtils:substringAfterLast('namescpaces are %here', '%'))|
|108               |eval((16 + 2) * 6)                                                |
|-6                |eval(100 / 5 - 16 * 2 + 6)                                        |
|true              |eval(`string\n1` == `string\n1`)                                  |
|false             |eval(`string\n1` == `string1`)                                    |
|I Am FINE         |eval(wordUtils:capitalize('i am FINE'))                           |
|i am fINE         |eval(wordUtils:uncapitalize('I Am FINE'))                         |
|tHE DOG HAS A bone|eval(wordUtils:swapCase('The dog has a BONE'))                    |
|FRD               |eval(wordUtils:initials('Fus Ro Dah'))                            |

evalGroovy

Evaluates groovy script and converts result to a string.

#{evalGroovy($script)}
  • $script - valid Groovy script to be evaluated

  • Any Vividus variable is accessible in the groovy script by its name

  • One could use any of online groovy evaluators to verify the script. For example see: Evaluator

Example 6. Evaluate Groovy script
When I initialize Scenario variable `listOfMaps` with values:
|key|
|2  |
|1  |
|3  |
Then `1-2-3` is = `#{evalGroovy(return listOfMaps.collect{it['key']}.sort().join('-'))}`

Null value

null

Represents null (a.k.a. NULL). In most case null means no value (see NULL in SQL and null in JSON).

#{null}
Null expression can only be evaluated separately. Strings or other expressions with the nested null expression will be completely ignored and not executed.
Example 7. Validation of JSON element with null value
When I initialize the scenario variable `json` with value `
{
    "persons": {
        "nemo": null
    }
}
`
Then JSON element value from `${json}` by JSON path `$.persons.nemo` is equal to `#{null}`