Linked Generators


Hi All,

The GenRocket team has just shipped a powerful new feature to GenRocket - Linked Generators.

What are Linked Generators?

Linked Generators are able to directly reference each other within an Attribute as opposed to indirectly accessing another Domain's Attribute to get its Generated value. Linking Generators to each other within an Attribute provides the ability to generate complex conditioned test data without the necessity of having to access another Attribute's generated value. Attributes can also reference other Attributes that generate complex test data via linked Generators.


Using Linked Generators

Linked Generators make generating complex test data much easier. Let’s say you are generating test data for a rental car company with the following requirements: 

There are three categories of cars being rented:

  1. Luxury
  2. Midsize
  3. Economy

For each category, there must be three types of cars to rent from:

  1. Mercedes E-Class 
  2. Lexus ES,
  3. Infinity Q45


  1. Camry
  2. Altima
  3. Accord


  1. Corolla
  2. Civic
  3. Elantra

The percentage of sales each category is weighted, is as follows:

  • Luxury 15% of the time
  • Midsize 35% of the time
  • Economy 50% of the time

Linked Generators Handle the Hard Part

The diagram below outlines how Linked Generators work. Each of these Generators is assigned to one Attribute.

  • ListGen 1: Randomly generates from the list of luxury cars
  • ListGen 2: Randomly generates from the list of midsize cars
  • ListGen 3: Randomly generates from the list of economy cars
  • MultiWeightGen: Return the weighted result


And just like that, your test data will show Luxury cars 15% of the time, Midsize 35% of the time, and Economy 50% of the time.


GenRocket PM

Login to post a comment