Simulating Data
This article lists and explains all available simulator functions.
Last updated
This article lists and explains all available simulator functions.
Last updated
In app development, the original data needed to test certain functionality might not be available during the building phase. In such instances, utilizing the simulator is a wise choice. The simulator provides a comprehensive set of functions, capable of generating various data types and pseudo random data.
To access the simulator, unfold Simulation
> Simulator
in the functionality panel.
Simulator functions do not differ from other functions in the way you can link, configure or extend them.
The randomInteger
function generates random integers. You can specify a minimum and/or maximum value for the random integer using the min:
and max:
options in the input field. The default is 0
to 99999
.
The randomNumber
function generates random rational numbers. You can specify a minimum and/or maximum value for the random number using the min:
and max:
options in the input field. The default is 0
to 1
.
With the randomString
function you can generate a string of random characters. The default length is 10, but can be set manually by inserting the desired length in the input box.
With the randomText
you can generate random text. Modify the generated text with the parameters listed below to fit your test case.
The error
function can generate an exception for testing purposes or for use in a workflow. Using the parameter customMessage
, you can define the error message.
The function randomObject
generates an object with 3
to 7
elements as default. You can set the number of entries with min:
and max:
.
With randomArrayOfIntegers
you can generate an array of integers of length 10. If you desire a different length, insert the length as a number in the input field.
With randomArrayOfNumbers
you can generate an array of numbers of length 10. If you desire a different length, insert the length as a number in the input field.
With randomArrayOfDigits
you can generate an array of digits (integers below 10) of length 10. If you desire a different length, insert the length as a number in the input field.
With randomArrayOfStrings
you can generate an array of strings of length 10. If you desire a different length, insert the length as a number in the input field.
With randomArrayOfObjects
you can generate an array of objects of length 10. If you desire a different length, insert a number in the first input field. Each array entry will contain multiple objects, the number of which you can control with min:
and max:
in the second input field. The default amount is 3
to 7
.
Generate numeric data with the randomNumericData
function. In its basic form, the output looks like an array of numbers, but using addTimeAxis: true
and timeFormat: 'epoch'
(can be either 'epoch'
, 'object'
, 'iso'
or 'string'
) you can add fake timestamps to the data. With nDataSets
and nDataPoints
you can define the size of the generated data. The default is 1
and 100
.
With the function randomAddressData
you can generate addresses. You can specify the number of addresses with entries:
and choose between german and US-american address types with locale: DE
. The default is 10
entries and german addresses.
With the function randomPersonData
you can generate data about imaginary people. You can specify the number of persons with entries:
and choose between german and US-american person data types with locale: DE
. The default is 10
entries and german person data.
Using randomChatData
you can generate data of a simulated chat. Insert the length of the conversation in the input box. The default is 10
.
With the function randomPointInCircle
you can generate one point of positional data in a circle around a specified latitude and longitude. The first input takes a number and specifies the radius of the circle in meters (default is 5000) and the second input takes the latitude and longitude coordinates, the default of which is
lat: 53.5511
lng: 9.9937
Using longExecution
, you can simulate a delay in function execution. Use this to test how your workflow will behave with different function execution times. You can specify the delay in milliseconds in the input field.
Parameter | Type | Default | Description |
---|---|---|---|
count
Integer
1
Number of "words", "sentences", or "paragraphs"
format
String
plain
Formatting of text as either plain
text or html
.
paragraph LowerBound
Number
3
Minimum number of sentences per paragraph.
paragraph UpperBound
Number
3
Maximums number of sentences per paragraph.
sentence LowerBound
Number
3
Minimum number of words per sentence.
sentence UpperBound
Number
3
Maximum number of words per sentence.
suffix
String
\n
Line ending, defaults to "\n
" or "\r\n
" (win32)
units
String
sentences
"paragraph(s)
", "sentence(s)
", or "word(s)
"