Sample Commerce Configuration Sheet Examples
Search Knowledge Base by Keyword
This page contains three examples of how to configure the Generation spreadsheet in the domain of Sample Commerce.
Order Date Example
This example shows how to Configure the Generation spreadsheet to generate Order Dates.
If we look at the Order tab, we will see a set of records such as the following:
If we look at the OrderDate row, we see that that there is a FunctionParameter containing RandomHelper.Faker.Data.Past(0). To understand this parameter, we can remove it and type into the cell =VIP which will initiate the auto-completion facility for the parameter value. Once we start typing =VIP.Date.Past, the first item on the completion list will be VIP.Data.Past(yearsToGoBack). Once we see that, we understand that the parameter for this function should be 0 if we want to use the current year’s data. So the full parameter should be VIP.Data.Past(0).
Order Number Example:
This example shows how to Configure the Generation spreadsheet to generate Order Numbers.
If we look at the second row of the Order table, we see the following value in FunctionParameters OrderNumber:
RandomHelper.GetRandomFormattedString(“VIP-?? ###”)
The ‘??’ stands for alphabetic characters and ‘###’ stands for numbers.
The string VIP-??### represents an order number.
Customer Id Example:
This example shows how to Configure the Generation spreadsheet to generate Customer Ids which are referenced by Orders.
If we look at line 4 above, the CustomerID, contains the FunctionParameter value of var_Customer_id. To understand how this works, we must look at the Mapping* table in this sheet which looks like this:
The display above tells us:
- Each Order must have a Customer. (Order is a Child of Parent Customer)
- When an Order is created, there is already a Customer for that Order in the DB, so that the Customer_Id can be referenced when an order is placed.
*It is not essential to create a Mapping table, but it is very useful and recommended to maintain referential integrity in the database.
Relationships
In the example database model shown in this article, an Order can reference a Customer and a Product can reference a Supplier, but a Product cannot reference a Customer or an Order. Likewise, an OrderItem can reference an Order, but an Order cannot be referenced by a Product.
So, in this example, the CustomerID must be assigned before the Order is created, so that we have access to this value.
-
-
-
- IEnumerable to Data Reader
- Data Table to List
- Nested String List to Data Table
- List to Data Table
- IEnumerable to List
- List to IEnumerable
- Remove from List
- Exists in List
- Value Exists in Dictionary
- Key Exists in Dictionary
- Remove from Dictionary
- Get from Dictionary
- Clear Dictionary
- Add to Dictionary
- Clear List
- Add to List
- Show all articles ( 1 ) Collapse Articles
-
-
-
-
- Introduction
- Overview of the Advanced Control Spreadsheet
- Refining the Control Spreadsheet
- The ProcessModel sheet – Toggling Subset Rules
- The Tables Sheet: Defining Metadata that will be read from the Source Database
- The ForeignKeys Sheet - Specifying which Foreign Keys to read from the Source Database
- Explanation of Remaining Sheets in the Control Spreadsheet (for reference only)
-
- Overview of Post-Subset Actions
- Add Primary Keys
- Add Foreign Keys
- Add Both Primary and Foreign Keys (The Composite ADDKEYS action)
- Validate that Primary Keys are Unique
- Validate that Foreign Keys are Unique
- Validate Both Primary and Foreign Keys (The composite ValidateKeys Action)
- Drop Foreign Keys
- Drop Primary Keys
- Drop both Primary and Foreign Keys (The composite DROPKEYS Action)
- Delete Orphans
- Truncate Data
- Drop Tables
-
-
- How to Configure the Synthetic Test Data Configuration Control Sheet
- Sample Commerce Configuration Sheet Examples
- Adding Event Hooks in Configuration sheet for custom functionality
- Use Event Hooks to call VIP Flows
- How the PreProcessVariables Table is used in the Configuration sheet
- PreProcess Variables and Parameters
- Using SQL Functions to query Databases and Using the Queries in Data Generation Functions
- Different Methods for Connecting to Source Databases
- Summary of the Process to Configure the Test Data Configuration sheet
-
-
-
-
-
- Test Modeller : System requirements (Windows, Linux)
- Test Modeller : Installation components
- Test Modeller: Software Pre-requisites
- Test Modeller Core (Linux) Installation
- Test Modeller Core (Linux) Optional – Active Directory
- Test Modeller Core (Linux) Optional – SSL Certificate Installation
- Test Modeller Core (Linux) Optional – Postgres LDAP
- Test Modeller – Maintenance
- The UI Recorder
-
-
-
- Articles coming soon
-
- Articles coming soon
-
-
-
- Welcome Selenium (Java)
- Prerequisites (Selenium Java)
- Configuration (Java)
- Scan an Existing Web App
- Build a Model (Java)
- Generate Automation Code
- Execute Tests (Java)
- Import existing framework / custom page objects (Advanced)
- Edit Code Templates (Advanced)
- Extend Test Modeller (Advanced)
- Common Problems
-
-
-