About Templates
Templates are test run configurations that have been saved to a project for later reuse. One of the biggest strengths of templates is their utility in integrating our VPT CLI into your CI/CD workflow; however, they currently can only be created through the VPT website.
The articles in this collection will focus on the utility of templates on the VPT website. For information on how to use templates elsewhere, please refer to the Continuous Integration and Continuous Delivery support collection, as well as the VPT CLI Command Reference documentation.
Creating Templates
You can create a template by clicking the “Add Template” button in the Templates tab of the Project page.
This will bring you to the Template Configuration page. This page is the same as the Test Run Configuration page except for the additional Template Name field at the top of the page.
Once you’ve configured the template to your liking, you can click the “Save Template” button to record your configuration.
Clicking the “Start Test” button will cause a warning to appear if you haven’t yet saved the template.
Alternatively, you can create a template from the Test Run Configuration page by configuring your test, then clicking “Save as Template”. In this case, a pop-up will appear asking you to name the template before saving.
Editing and Cloning Templates
To edit an existing template, you can navigate to the Templates tab of the Project page and select the template you wish to update. Make any changes you wish to apply, then click “Save Template”.
You can also clone an existing template from its Template page by clicking the Clone button next to the Template Name.
This will duplicate the given template. The copy will have the same name as the original except for the text “CLONE – “, prepended onto it.
Once cloned, any edits you make will apply only to the new template.
Using Templates
Once a template has been created, you can start a test from the template in a few different ways. When using the “Run a Test” button in the top navigation bar, the modal that appears allows you to select from any templates in the selected project.
You can also start a test from a template by selecting one in the Templates tab of the Projects page, then clicking Start Test on the Template page.
You can also schedule a test run from the Template page by clicking Schedule a Test. For more information about scheduling, please refer to the article on Schedules.
Once a test is run from a template, the template will appear as associated with the Test Run in both the Latest Test Runs list on the Home page dashboard and the Test Runs tab of the Project page.
You’re also able to view all Test Runs that have been run using a given template by going to the History tab of the Template page.