Skip to content

Random test data support Overview

APIJockey TEST supports several options to provide random data in our tests:

  • You enter your random data in a table editor where the data is stored inside your test definitions and APIJockey TEST will read a random row during the test run.
  • You provide random value provider configuration i.e. you define simple rules inside a teststep that allows for random data generation
  • You provide a CSV file where a random row will be used during test run.

Create a Manual RandomizedValuelist Teststep

Creates an empty table of rows and columns and randomizes data in this table to provide variables values. You may edit rows and columns and apply formatting.


Steps to create a manual RandomizedValuelist Teststep

Select the button create new RandomizedValuelist teststep with manual data entry

Screenshot with button create new manual RandomizedValuelistTeststep

This opens a dialog that allows you to enter the name of the teststep. You can choose to enter this name at any point later in time.

Dialog create new manual RandomizedValuelistTeststep with name

When you confirm with OK the dialog disappears and creates a new entry in the teststep list. Cancel dismisses without creating the teststep.

When you select the new teststep, the Manual RandomizedValuelist Teststep editor opens. See details to edit the randomized list value in Manual Randomizedvaluelist Teststep View

If you have a CSV file that you want to import, you may want to Create a RandomizedValuelist Teststep

Create a Randomize Teststep with a Random Value Provider

This walkthrough shows you, how to create a Randomizeteststep and define a Randomvalueprovider that provides random, in this case a simplified Vehicle Identification Number (VIN)

Step 1: Create a RandomizeTeststep

Select the button create new RandomizedValuelist teststep with manual data entry

Screenshot with button to create a new RandomizeTeststep

This opens a dialog that allows you to enter the name of the teststep. You can choose to enter this name at any point later in time.

Dialog create new RandomizeTeststep with name

When you confirm with OK the dialog disappears and creates a new entry in the teststep list. Cancel dismisses without creating the teststep.


When you select the new test step, the RandomizeTeststep editor opens. See details to edit the randomized list value in RandomizeTeststep View The RandamizeTeststep displays an empty list of RandomValueProviders and, if selected the editor to configure the random value provider.

/Screenshot from RandomizeTeststep with Button to create a new RandomValueButton


Step 2: Create a RandomValueProvider for a simplified VIN

We want to create ONE RandomValueProvider in this RandomizeTeststep that provides random VINs The VIN:

  • starts with WDB
  • contains 14 subsequent alphanumerical characters

We want to store this random VIN in a testcase variable vin, which we need to create.


Click with your mouse on the button create new random value and enter the name VIN (Vehicle Identification number). We will create a simplified VIN-generator that is sufficient for our purposes. Select the string random value provider - entry VIN. This opens the StringRandomvalueProvider editor.

Empty RandomValueProvider View


Click with your mouse on the button create new String random value (#text). This opens a dialog for the element to be created.

RandomizeTeststep create new expression value button

Insert the name WDB and confirm with OK. This will insert a new expression value, which we need to select to edit it.

RandomizeTeststep Dialog new StringRandomValueExpression


When you select your WDB expression, you will see an editor on the right side, with some defaults. We keep them for the moment. Click with your mouse on the button Test your randomValue to see the outcome. The random value is displayed besides the text current random value preview:. this is not yet want we wanted. We set the value expression type to fixed and set the included characters to WDB. and test again our randomValue.

String RandomvalueProvider fixed value type example

Click again with your mouse on the button #text. This opens a dialog for the element to be created. Enter the name VINtail and confirm with OK. This will insert a new element, which we need to select to edit it. Edit the value expression as follows

  • included values ABCDEFGHIJKLMNOP123456789
  • number of random characters 14
  • make sure the VINtail comes after the WDB. You may use move up or move down.
  • Click with your mouse on the button Test your randomValue to see the outcome. The random value is displayed besides the text current random value preview:.

This would give following result: String randomvalue provider final result


Step 3: Reference a testcase variable

The command Test your random value lets you verify, if the definition works as desired. To use this definition. you must link a variable to the RandomValueProvider. This is done with the VariableValueTransfer view. Let's create this here.

RandomizeTeststep VariableValueTransfer


We add a new variable with name VIN on the testcase and connect it to our RandomValueProvider.

Click with your mouse on Add Variable. A dialog opens where you can edit the name and (optionally) the value. We'll keep the value at it is. Enter the name VIN

RandomizeTeststep Dialog new variable


You will see the new variable. RandomizeTeststep variable list with VIN variable


Double click the variable to get the variable connected to your RandomValueProvider

RandomizeTeststep variable connected

When you click Run teststep now, you will see synchronized value for:

  • RandomValueProvider preview
  • the expression list preview
  • the connected variable value.

If you want, you can verify the variable value itself in the sidebar navigation, which we may need to make visible first, depending on the current state, you may toggle to show the sidebar here:

RandomizeTeststep toggle sidebar button


When the sidebar is visible, you will see the variables list, and in this, you'll find your connected and updated variable.

RandomizeTeststep Testcasevariables with updated VIN variable

Create a RandomizedValuelist Teststep

Takes a CSV file as input and randomizes data in this file to provide variables values.


Steps to create a RandomizedValuelist Teststep

The RandomizedValuelist Teststep expects a CSV file as input. You will find a sample walkthrough in Steps to create a CSV file with Apple® Numbers

Select the button create new RandomizedValuelist Teststep

Screenshot with button create new RandomizedValuelistTeststep

This opens a dialog that allows you to enter the name of the teststep. You can choose to enter this name at any point later in time.

Dialog create new RandomizedValuelistTeststep with name

When you confirm with OK the dialog disappears and creates a new entry in the teststep list. When you select the new teststep, the RandomizedValuelist Teststep editor opens. See details to configure the randomized list value in Randomizedvaluelist Teststep View

If you have a CSV file that you want to import, you may want to [Create a manual RandomizedValuelist Teststep]


Steps to create a CSV file with Apple Numbers

This short tutorial demonstrates a very basic CSV file that serves as input. It provides a small set of contact information. We assume we have a limited set of data and would like to create randomized combination of the data. e.g. Column 1 - Row 1 with Column 2 Row 7....

sample CSV file with basic contact information

We created our limited test data in Apple® Numbers,but it does not really matter, what source the CSV is created from. We cover Apple® Numbers here to show how this can done.

Export the table

  • Select the menu File
  • Select the menu item Export To
  • Select the sub menu item CSV...

File - Export- Menu for Numbers

This opens a two steps wizard that allows you to customize export settings.

  • Choose CSV
  • Keep include table names unchecked
  • Under Advanced Options make sure, Unicode (UTF-8) is selected
  • Click Next...

choose CSV as destination export format

Select your favorite destination folder. In the screenshot, this is the personal download folder.

choose downloads folder as destination export location

When you open Finder you will find the CSV file in the folder downloads.