OtfTemplates

From emotive
Jump to navigation Jump to search


Overview

OTX templates are very similar to the templates found in MS OfficeWord. They can be used for a quick and easy creation of user specific structured projects, documents and/or procedures. Templates can contain placeholders. A placeholder can be located inside OTX documents, in file names (document) and folder names (package).

Storage location

The OTX templates are stored in the folder

[ProgramData]/emotive/Open Test Framework/Templates/

The file Default.ptxt is the OTF default template. All new projects, documents and procedures are based at this template. In other words, if this template was changed, the content of the new projects, documents and procedures will also be changed.

Step by step creation

This section describes the creation and usage of a user defined template step-by-step.

  1. Create a project (or a player) in OTF with the structure you want. Please note that all the elements of this project will be copied later as it is into a new element (Project, Document or Procedure).
  2. Right click on the current project (or player) and select menu Export... > Export as template....
  3. You can customize your template by opening the exported template with an unzip program e.g. the winRAR and modify the file 'TemplateSettings\OtfTemplateConfig.xml'
  4. Go to the Ribbon menu File > New page, click on the Add Template... (+) button.
  5. Browse to the location where you have exported the template, select the template and click OK to add it into the '[ProgramData]/emotive/Open Test Framework/Templates/'.
  6. You can now add the new template as a project in a solution with the new entry in the New tab of File menu or with the new entry in the context menu Add of the solution node.

Placeholder

During applying of a template all placeholders will be replaced with the corresponding values. The placeholder has the following format:

~~id_67576d3026a84070b9b656d62172f559~~

A placeholder can exist in each OTX files at any place and also in the name of the files and folders. Only file names and folder names below the OTX folder (in the PTX) will be replaced. A placeholder can be formatted inside the template settings file 'TemplateSettings\OtfTemplateConfig.xml'. You will find an annotated schema ('OtfTemplateConfig.xsd') inside the folder, which describes the structure of the settings file.