Simulating data
This article lists and explains all available simulator functions.
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
Simulator functions do not differ from other functions in the way you can link, configure or extend them.
Random integer
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
.
Random number
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
.
Random string
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.
Random text
With the randomText
you can generate random text. Modify the generated text with the parameters listed below to fit your test case.
Parameter | Type | Default | Description |
---|---|---|---|
count | Integer |
| Number of "words", "sentences", or "paragraphs" |
format | String |
| Formatting of text as either |
paragraph LowerBound | Number |
| Minimum number of sentences per paragraph. |
paragraph UpperBound | Number |
| Maximums number of sentences per paragraph. |
sentence LowerBound | Number |
| Minimum number of words per sentence. |
sentence UpperBound | Number |
| Maximum number of words per sentence. |
suffix | String |
| Line ending, defaults to " |
units | String |
| " |
Error
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.
Random object
The function randomObject
generates an object with 3
to 7
elements as default. You can set the number of entries with min:
and max:
.
Random array of integers
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.
Random array of numbers
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.
Random array of digits
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.
Random array of strings
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.
Random array of objects
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
.
Random numeric data
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
.
Random address data
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.
Random person data
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.
Random chat 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
.
Random point in circle
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
Long execution
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.
Last updated