Skip to content

Templates

Templates provide a structured way to standardize test cases, test suites, code snippets, defects, and test run metadata. They help streamline the creation and maintenance of test assets across the project. By using templates, teams can apply consistent formatting, reduce manual input, and improve clarity in test documentation and reporting.

  • Test Templates: used to define the structure and content for individual test cases;
  • Suite Templates: used to define the structure and content of individual test suites;
  • Code Templates: used to define the default code structure for automated tests using dynamic variables;
  • Defect Templates: used to automatically prefill the issue summary and description fields when reporting defects to integrations like Jira, GitHub, or Azure;
  • Defect Description Templates: used to structure the description field for defects inside Testomat;
  • Meta Templates: used to define custom metadata fields that are shown in test run reports and help enrich report context;

Use the Templates section in Settings to create, edit, or delete reusable content structures for tests, suites, defects, and more. Templates help maintain consistency and reduce repetitive manual input when documenting or reporting within your project.

All templates share a similar creation flow:

  1. Navigate to Settings in the sidebar
  2. Click on Templates
  3. Click the + icon next to the relevant template type

Create a new template

Once the Add template sidebar opens,

  1. Fill in the following fields:
  • Title (required): enter a unique title and optionally add tags using @ syntax (e.g., @smoke);
  • Type: select template type from the dropdown (e.g., test, suite, code, meta, defect, defect-details);
  • Default (optional): check the Default option if necessary;
  • Labels & Custom Fields: select from dropdown; if you want to add more, see Labels & Custom Fields documentation;
  • Template (required): Add body content using dynamic variables and logic;
  1. Click Save button to apply changes or Cancel button to discard

Save template

  1. Navigate to Settings in the sidebar
  2. Click Templates
  3. Click a template you want to edit
  4. Modify content as needed
  5. Click Update button to save changes

Update template

  1. Navigate to Settings in the sidebar
  2. Click Templates
  3. Hover over the needed template and click the Delete icon

Delete template

  1. Click the Delete button in the ‘Are you sure?’ pop-up to confirm deletion

Confirm deletion

Templates in Testomat.io support dynamic content using variables. Variables are enclosed within double curly braces {{ }}. This syntax ensures they are correctly parsed and rendered with the corresponding value.

Example: {{ test.title }}

Below is an overview of which variables are supported for each template type:

Template TypeSupported Variables
Test Templatestest.title, test.description, test.tags, test.labels, test.attachments
Suite Templatessuite.title, suite.description, suite.tags, suite.labels
Code Templatestest.title, test.description, suite.title, suite.description, body
Defect Templatestest.title, test.description, test.assignee, test.priority, test.tags, test.attachments, jira.issues

Templates support conditional logic using {{#if}} statements. This allows you to display content only if certain conditions are met.

  • {{#if test.tags}} Tags: {{ test.tags }} {{/if}}

Explanation:

  • The block will render Tags: [actual tags] only if test.tags has a value;
  • If test.tags is empty or undefined, nothing will be displayed;

Templates can be applied either automatically (when marked as default) or manually while working on tests, suites, defects, or code structures in your project.

  1. Go to Tests tab
  2. Open the relevant test case or suite in Edit mode
  3. Select the needed template in the Use Template dropdown

Use Template

  1. Confirm your selection - the template will be applied to the current item

Confirm selection

The selected template will automatically populate the fields (like title or description) using the defined variables.

::: note

When you create a new test or suite, the default template (if configured) will be applied automatically. This helps ensure consistent formatting and structure without manual selection.

:::

  1. Go to Tests tab
  2. Open the relevant test case in the CODE TEMPLATE tab
  3. Select the needed template in the extra menu

Apply Code Template

  1. Go to Runs tab
  2. Open the relevant ongoing run
  3. Click the Continue button

Continue ongoing run

  1. Click the Link Defect in the failed test

Link Defect button

  1. Click the Create new issue button

Create new issue button

When the Create New Issue modal window is opened, fill in the required fields:

  1. Select profile (e.g. Jira Integration) from the dropdown list
  2. Select Jira Issue Type from the dropdown list (e.g. bug)
  3. Select Template from the dropdown to apply Defect Templates to automatically prefill the summary and description fields
  4. Add a title to the field
  5. Click the ‘Create Jira Issue’ button

Create Jira Issue button

  1. Go to Runs tab
  2. Open the relevant ongoing run
  3. Click the Continue button

Continue ongoing run

  1. Click the Edit metafields button under the test result

Edit metafields button

  1. Fill in the Key and Value
  2. Click the Save button

Save Meta Data

  1. Click the Finish Run button

Finish Run button

  1. Open the test in run report to see how meta data is applied

Meta data

  • Regularly review and update templates to ensure relevance
  • Utilize labels and tags strategically for efficient organization
  • Encourage collaboration to create standardized templates across teams