Description

Test Data Cases are a key part of GenRocket's Self Service Test Data Portal. We organize all the Test Data Case functionality into a part of the GenRocket platform we call "G-Cases".


When should you use Test Data Cases?

  • Any time you want to define and build test data.


How do you use Test Data Cases?

  1. Create a Test Data Case Suite to organize the Test Data Cases into a group of cases
  2. Create different Test Data Categories (e.g. Unit, Load, Integration, Negative...)
  3. Build out your different Test Data Cases with Test Data Case Domains, Loop Counts, etc.


Overview Video

Please take a minute to view the following videos showing how Test Data Cases work in GenRocket:



Next Video in the Test Data Cases Training Series


Helpful Definitions

The following concepts are key to this feature:

  • Test Data Case Suite - A group of Test Data Categories with their own Test Data Cases, which can be used to test the validity of synthetic data used for your system. Test Data Case Suites exist within a given Project Version of a Project.

  • Test Data Category - Defines the type of testing that will be performed (unit, load, beta, etc.) and can contain one or multiple Test Data Cases to meet your specific needs.

  • Test Data Case- Defines the Domains and Loop Counts to be generated when the Test Data Case Suite is run with a Scenario, Scenario Chain, or Scenario Chain Set.


How Do Test Data Case Suites Work?


Defining a Test Data Case Example: Load Testing

Story

A QA Tester needs to generate user test data to perform a Load Test. For this Load Test, the tester needs to generate the following data: 

  • 5 Companies
  • 10 Departments
  • 100 Users
  • 1 to 3 Addresses per User


Let's follow the steps to create our Test Data Case Suite with a Test Data Case for this Load Testing example.


Step 1: Select the G-Cases Menu Option

Expand the Self Serve Menu Options drop-down menu within the Project Versions Pane and select G-Cases. Test Data Cases are specific to a Project Version within a Project.


Note: For detailed steps on how to access and view Test Data Case Suites, click here


Step 2: Create a Test Data Case Suite

A user can set up their own Test Data Case Suite for testing purposes without affecting others who may be using the same information to generate their own data. Multiple Test Data Case Suites can be created within a given Project Version and contain their own Categories and Test Data Cases. 



Note: For detailed steps on how to create a Test Data Case Suite, click here


Step 3: Add Test Data Categories to the Suite

A Test Data Case Suite can have one or multiple Categories. A Category represents the type of testing the data will be generated for (Beta, Load, Unit, Stress, Integration, Performance, etc.).


Note: For detailed steps on how to add Categories to a Test Data Case, click here


Step 4: Add Test Data Cases to each Category

Each Test Data Case defines what Domain data will be generated and how many records will be generated for each Domain (i.e. loopCount). At least one Domain will need to be added to a Test Data Case Category.


Note: For detailed steps on how to add Test Data Cases to a Category, click here


Step 5: Add Domains to each Test Data Case

Domains should be added to a Test Data Case in the order that you want test data to be generated. You can add one Domain or many Domains based on your specific needs.


Note: For detailed steps on how to add and manage Domains for a Test Data Case, click here


Step 6: Alter Domain Loop Counts for each Test Data Case

The Loop Count defaults to what has been set for the Domain's Global Variable value. The Loop Count can be changed for each Domain within a Test Data Case to alter the amount of test data that is generated. It can reference the Global Variable value or be one of the following: 

  • Constant - A constant value (e.g.) Domain Global Loop Count or a Number Value)
  • Random - A random value from a defined range (e.g. 1 to 3).
  • Increasing - Increasing based on a defined Min and Max range.
  • Decreasing - Decreasing based on a defined Max and Min range.



Note: For detailed steps on how to alter Domain Loop Counts for a Test Data Case, click here.


Step 7: (Optional) Add New Attribute(s) to a Test Data Case Domain

Every Attribute at the Domain Level is included in the Test Data Case Domain by default. The Domain Level is a template that can be used and built upon.  


Additional Attributes may be added to a Test Data Case Domain. These Attributes will only be used during test data generation when that particular Test Data Case is run by GenRocket Runtime.


This is helpful when you want to use a Test Data Case to generate your data and need one or more additional Attributes that should only be available at the Test Data Case Domain Level for a Project Version. 



Note: For detailed steps on how to add a new Attribute to a Test Data Case Domain, click here.


Step 8: (Optional) Modify an Existing Attribute's Configuration within a Test Data Case Domain

Within a Test Data Case Domain, you can add one of the Attributes that has been configured at the Domain Level and then make Generator/Parameter configuration changes that are specific to the selected Test Data Case Domain. These changes do not impact the Attribute at the Domain Level and are specific to the Test Data Case Level.



Let's say for example, you want to perform negative testing on a Customer SSN. By default, the SSNGen will be assigned to the Attribute at the Domain Level. However, the SSNGen on its own will use the Luhn algorithm to generate valid SSNs. 


If you need every 4th SSN to have a negative value, then changes will need to be made to the Generator configuration to produce this type of data during test data generation. 

 


Once the Attribute has been added to the selected case, you will be able to link additional Generators and make Parameter configuration changes to achieve this type of testing goal. 



Note: For detailed steps on how to add existing Attributes to a Test Data Case Domain and alter their configuration, click here.


Step 9: (Optional) Add Test Data Rules to a Test Data Case

As part of our Self-Service Test  Portal, a Test Data Rule Suite may be added to a Test Data Case to apply business logic during test data generation. This allows the rules to be applied when a Test Data Case is run without having to perform additional steps. 



Note: For detailed steps on how to add Test Data Rules to a Test Data Case, click here.


Step 10: (Optional) Add Test Data Queries to a Test Data Case

As part of our Self-Service Test Data Portal, Test Data Queries may be added to a Test Data Case to query real data and blend it with synthetic data during test data generation. One or multiple queries may be added and applied when a Test Data Case is run without any additional steps.


Note: For detailed steps on how to add Test Data Queries to a Test Data Case, click here.


Step 11: Download the Test Data Case Suite

Once a Test Data Case Suite has been set up, it can be downloaded to the tester's local machine. A Test Data Case within a Suite can be run with any Scenario,  Scenario Chain, or Scenario Chain Set within the Project containing all or some of the Domains used to configure the Test Cases. The defined Receivers will be used to generate the output data.



Note: You will need to download the Scenario, Scenario Chain, or Scenario Chain Set to be used during test data generation as well.


Step 12 : Run a Test Data Case in a Command or Terminal Window

To run a Test Data Case, you will need to use the provided command line within the Test Data Case Dashboard. Select the Test Data Case you want to run to view the command line for that case: 



Note: For detailed steps on how to download and run a Test Data Case Suite, click here.


The Completed Story

In just a few minutes we are able to define a simple Test Data Case Suite for performing a basic Load Test. This Test Data Case Suite can be downloaded and used to modify any Scenario, Scenario Chain, Scenario Chain Set. The complete Test Data Case will appear as shown below: 



Additional Examples

To view more examples for Test Data Cases, click on a link below: 


Additional Information

To learn more about setting up and configuring Test Data Cases for a Project, please see the following pages: