Allocation Code Template

Search Knowledge Base by Keyword

< Back

The code generators within Test Modeller use configurations in the background. To create or edit a code generation template. Navigate to the configuration page within the workspace tab of the left hand side menu.

Navigate to the code templates tab and select an existing template or click new template.

Custom Allocation Code Templates in Test Modeller

Here we choose to create a new code template while copying from an existing template to edit. You can also create a new template if you require. Note – it is important to select the language type being consumed.

New Code Template

The template item names are reserved, these can be broken down into 5 template types:

Template NameDescription
TestCaseTemplateThe master template for the test case. This is typically used to represent the entire test suite for a model.
TestCaseMethodTemplateThe code for each instance of a test case within the test case template
AllocateTagTemplateThe tag to use for specifying a data allocation – throughout this manual we have used ‘@DataAllocate’
AllocateDataRowTemplateThe code snippet to use for retrieving the data allocation results from the data allocation API.
AllocateRetrieveDataValueTemplateThe code snippet to use for querying the retrieved results to access the required column.