Template Types

Search Knowledge Base by Keyword

< Back

TestCaseTemplate

This is the master template for all code to be generated. Typically, one TestCaseTemplate is embedded per test model.

KeywordDescription
{{{ModelURL}}}URL of the model
{{{TestCaseName}}Name of the test case
{{{test-suite-id}}}ID of the associated test suite being exported
//Region – TestcasesRegion to embed test case definitions code template – See TestCaseMethodTemplate.
//EndRegion – TestcasesTerminal location to stop embedding test case definitions

Below is an example:

TestCaseTemplate Example

TestCaseMethodTemplate

This is the test case template used for each instance of a test case (i.e. path) within the model. This is embedded when the ‘//Region – Testcases’ and ‘//EndRegion – Testcases’ keywords are embedded within a code template.

KeywordDescription
{{{groups}}}Tags defined in the model
{{{test-guid}}Guid of the test case in test modeller
{{{allocateTag}}}Allocate tag. If any allocations are defined for the test case this will be replaced with the ‘AllocateTagTemplate’
{{{TestName}}}Name of the test case. This is the name of the path.
//Region – AllocateRegion to embed any ‘AllocationDataRowTemplate’ tags to initialise any allocations performed within the test case.
//EndRegion – AllocateEnd region for allocate tags
//Region – Test LogicRegion to embed the test logic for the test case.
//EndRegion – Test LogicEnd region for test logic

Below is an example:

TestCaseMethodTemplate

AllocateTagTemplate

The tag to use for functions which have Data Allocation defined within the test case. This is embedded whenever the code template engine comes across a tag with {{{AllocateTag}}} embedded within it.

KeywordDescription
{{{AllocatePoolName}}}Allocation pool name being used.
{{{AllocateSuiteName}}}Suite name performed.
{{{AllocateGroupName}}}Group of test names of the allocation to be consumed.

Below is an example:

AllocateTagTemplate example

AllocateDataRowTemplate

This is called to initialise a new allocate data row object whenever a test case needs to access a previously unseen test allocation method this tag is embedded.

KeywordDescription
{{{AllocateResultName}}}Auto-generated variable name for the allocations.
{{{TestPoolName}}}Name of the allocation pool that is being referenced
{{{TestSuiteName}}}Name of the test suite
{{{AllocateName}}}Name of the allocation test case

Below is an example:

AllocateDataRowTemplate example

AllocateRetrieveDataValueTemplate

This is the code used to retrieve an allocated value from a test allocation object. This is only embedded in functions where the allocation is referenced.

KeywordDescription
{{{AllocateVariableName}}}Auto-generated value which refers to the corresponding allocation initialised within
the ‘AllocateDataRowTemplate’
{{{AllocateColumnIndex}}}Index of the value required from the allocation object for the referenced
parameter.

Below is an example:

AllocateRetrieveDataValueTemplate Example