Generating data using Monte Carlo data sets
Introduction
Testing any large-scale application requires large amounts of varied data. In many organizations, live data is inaccessible or scrubbed, which renders it useless. Learn how to generate a Monte Carlo data set as mock data that can be used for testing.
Video
Transcript
In this demonstration, you learn how to use a Monte Carlo data set to prepare test data that can be used in data flows and strategies.
Start by creating a data set rule of type Monte Carlo. Specify the Apply to class. In this example, it is the Customer class.
To configure the data set, select the locale and the number of records you want to generate. You can change these values later.
To configure an individual data field, select a property and the method to populate that field.
The properties displayed belong to the Apply to class.
There are different method types that can be used to populate each data field. The list includes standard Pega methods as well as the Monte Carlo method.
The Monte Carlo method contains a list of what are known as Providers that you select to generate records for a variety of information types.
To select a Provider, press the down arrow key. The list of all available Providers is displayed.
To narrow down the choice, enter a few characters. For example, if you type Name, you only see the Providers relating to that string.
Add a few fields and generate an address for your customer. From the Address Provider you can define a city, country, and street.
Then, using a simple expression, you can combine them into an address line. The expression can be a simple concatenation or a complex financial formula. All fields used in an expression must be declared before the expression is evaluated. The same rule applies to all other methods.
Some Providers need extra information to generate the data. In this application, the Churn Score property has a value between 0.0 and 1.0.
The Consecutive Provider enables you to generate a unique key for each row of data. In this example, the Customer ID is prefixed by CON dash.
Save the data set and examine the results.
You can change the locale and see the updated results. Locale is a set of parameters that defines the user's language, region, and any special variant preferences that the user wants to see in the interface. In this example, both the Address and Full Name are displayed in Polish locale.
You have now reached the end of this demonstration. In this demonstration, you learned how to generate mock data that can be used for testing.