Generators

Definition

Generators are algorithms or data sources used to assign variables with values.  Several generators are available:

• Basic data:  These generators generate data based on the data type they represent.  Use parameters to control the value that is generated.
• Profile-based:  These generators retrieve data from a selected profile.  Profiles contain tables for code sets and other structures specifying message format and content.  If you must ensure that test messages are built with valid (or constrained) data, this generator is critical.
• Record-based:  Those generators retrieve data rows from different data sources. During test execution, all variables that use the same generator, use the same record.
• Environment-based: These generators retrieve data in a way that’s dependent on the current active environment. This can be useful for rapidly switching the parameters of a test based on what environment you’re testing.

Advanced Mode

Combining Generators

In Advanced Mode, you can generate data with complex data formats by combining generators for a single variable.  For instance, a patient ID with the format XXX9999M (3 random characters, a number between 0000 and 9999 plus a static character at the end) can be generated by combining Excel, numeric, and string generators.

To combine generators:

1. Click the Advanced Mode link in the generator section.
2. Click the Add link that appears.
3. Configure the newly created generator.
4. Redo steps #2 and #3 if needed.

Change the generator order by dragging and dropping them in the generator chain.

Generator Formatting

Use the Generator formatting field to add more formatting. You can create sophisticated values that mimic unstructured data using this functionality. Formatting can be quite powerful.

 Generator Formatting Generated Value Description Numeric 0-99 He is {0} years old He is 34 years oldHe is 17 years oldHe is 88 years old {0} is replaced with the generated value Numeric 0-99 {0} + {0} = 2*{0} 34 + 34 = 2*3417 + 17 = 2*1788 + 88 = 2*88 A generator can be used several times Numeric 0-99 {0:D5} 00042932770300715432 Adding leading zeros so the values has 5 digits String (length=1)Numeric 0-99999 {0} – {1} P – 22C – 42I – 1L – 82 Generators are combined and formatting is added Excel (first name)Excel (last name) {1}^{0} Doe^JohnSmith^Suzan Generators are combined to create a field value having 2 components (subfields)