Difference between revisions of "OtfTemplates"

From emotive
Jump to navigation Jump to search
 
Line 9: Line 9:
 
<code>[ProgramData]/emotive/Open Test Framework/Templates/</code>
 
<code>[ProgramData]/emotive/Open Test Framework/Templates/</code>
  
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 changed.
+
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==
 
==Step by step creation==
The following section describes the creation of a user defined template step-by-step.
+
This section describes the creation and usage of a user defined template step-by-step.
# Create a project in OTF with the structure you want. Please note, that the all elements of this project will be copied later as it is into a new element (Project, Document or Procedure).
+
# 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).
# Save this project as a PTX. Please note, that a PTX is only a ZIP archive with a special content file (index.xml)
+
# Right click on the current project (or player) and select menu '''Export...''' > '''Export as template...'''.
# Copy this PTX to the OTF template folder [ProgramData]/emotive/Open Test Framework/Templates/ and rename the extension to "*.ptxt". Inside this folder you will find the Default.ptxt. This is the default template of the OTF for new Projects, Documents or Procedures. Changing this template will effect all new elements inside the OTF.
+
# 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'
# Copy the whole folder "TemplateSettings" from Default.ptxt inside your new created template.
+
# Go to the Ribbon menu '''File''' > '''New''' page, click on the '''Add Template...''' ('''+''') button.
# Look for the file "OtfTemplateConfig.xml" inside that folder and adapt it to your requirements. You will find an annotated schema ("OtfTemplateConfig.xsd") inside the folder, which describes the structure of the settings file.</xsd:documentation>
+
# 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/'.
 +
# 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==
 
==Placeholder==
Line 24: Line 25:
 
<code>~~id_67576d3026a84070b9b656d62172f559~~</code>
 
<code>~~id_67576d3026a84070b9b656d62172f559~~</code>
  
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 "OtfTemplateConfig.xml". You will find an annotated schema ("OtfTemplateConfig.xsd") inside the folder, which describes the structure of the settings file.
+
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.

Latest revision as of 05:23, 17 October 2018


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.