A conditional generation rule is an ad hoc rule in which you can specify a conditional expression and a generation rule to generate test data.
You can use the string, numeric, and date data types in a conditional generation rule. You can apply multiple conditions for a generation rule. When you run a data generation plan, TDM applies the conditions based on the order specified. You can use the up and down arrows to change the order of the conditions.
You cannot apply conditions on effective dates and sequence generation rules.
The following image shows the conditional generation parameters:
Conditional Generation Example
You work for the Human Resources department and you need to decide on the hike and bonus percentages for employees based on the departments. If the DEPT_ID is 11, give a hike of 5%. If the DEPT_ID is 22, give a hike of 10%. If the DEPT_ID is 33, give a hike of 15%.
You can apply a conditional ad hoc generation rule on the HIKE column. You can specify the conditions for each department and select a generation rule. The DEPT_ID column must have a generation rule assignment. When you run the plan, TDM generates data for the DEPT_ID column first. Based on the DEPT_ID column, TDM generates data in the HIKE column.
You can also assign bonus percentages with the HIKE column as the dependent column. Assign a conditional generation rule to the BONUS column and add conditions to the HIKE columns to assign bonus percentages.