Code generation templates
The code generation subsystem uses declaration templates and creation templates.
The declaration templates contain code for declarations of the methods and classes creating the test element. The creation template contains code that calls these methods to instantiate the test element objects.
The type of the template is reflected
in the template name and is defined by the
com.ibm.rational.test.lt.codegen.core.elementTypeTemplateBinding
extensions. Note: It is possible to have name conflicts between
code generation templates with the same names that come from different
protocol extensions. Use template names containing a protocol name
(for example: HTTPScript.template) to avoid this problem.
The following example shows a creation template for a DCSubstituter
object:
ISubRule sub_<PARAM name="subRuleIdx> = newSubRule(<PARAM name="targetAttr">",
<PARAM name="offset">,
<PARAM name="length",
<PARAM name="isEncoded",
<PARAM name="dataSourceVarName">,
<PARAM name="parentInstancename">, addSubInstruction (sub_<PARAM name="subRuleIdx">);