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)
Select the button create new RandomizedValuelist teststep with manual data entry
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.
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.
We want to create ONE RandomValueProvider in this RandomizeTeststep that provides random VINs
The VIN:
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.
Click with your mouse on the button create new String random value (#text). This opens a dialog for the element to be created.
Insert the name WDB and confirm with OK. This will insert a new expression value, which we need to select to edit it.
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
.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
This would give following result:
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.
You see a list of variables (of type String). These are part of the walkthrough Create a RandomizedValuelist Teststep
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
You will see the new variable.
Double click the variable to get the variable connected to your RandomValueProvider
When you click Run teststep now, you will see synchronized value for:
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:
When the sidebar is visible, you will see the variables list, and in this, you'll find your connected and updated variable.