Test screen template introduction
With the test screen template editor you can build screen components which you can then use in your test.
Building screen templates is a complex process. Do not be discouraged if it seems complex at first glance.
Some of the features of the screen template editor are :
- Create a template for test taking
- Create a template for viewing and entering data in what is called PnP mode (Paper and Pencil mode)
- Define behaviour for your test screen template in the Test Editor
To access the screen template editor you will need to have the right as Screen template author.
- Open the ITR menu, access Test and Reports and select the menu item "Edit test screen templates".
- The list of templates will appear.
- Select the temlate you want to edit or add a new one
You will and up in the "Screen template editor" screen. The screen looks like this.
The following fields are available.
- Description; enter a description for the template
- Explanation; enter an explanation for the template as shown to the test builder
- Remarks; any remarks you might have'
In the template variable section.
- Buttons : add and remove template variable, to add and remove template variables
- Var name; the name of the variabe
- Description; a description of the variable as shown to the test builder
- Default value; the default value for this variable. In case of a list type of variable use the following format : LISTID|LIST TEXT, NEXTLISTID|LIST TEXT. For example : btn-sm|Small button,btn|Normal button,btn-lg|Large button
- Type of variable; the type of variable. Supported types are : Text, Text (multiple lines), HTML text, List of choices, On/Off switch, Color picker, Placeholder, Explanation.
A placeholder is a special type of variable which is a place you can generate other templates in. For example in the case you want a special layout for your screen.
In the HTML and scripting section.
- HTML template; the HTML template for test taking usage. Use %% signs to include a variable value as set in the test editor for this template. For example : %%ButtonSize%%. Use the special header to indicate that a certain block needs to be repeated. Also terminate this block with . Any variables in the section are immediately considered as repeatable variables. Special variables are %%ID%% which is the ID of the current generated element and %%RepeatBlockNr%% which is the number of the current repeated block.
- HTML template for PnP; leave empty in case the test taking and PnP template are the same. Otherwise the same options are available as on the HTML template variable
- Initialisation snippet (id, num_blocks, test_mode, template_values); a snippet to initialise anything that you might want to init. For example support functions. test_mode is TE (test editor mode), TT (test taking mode) or
- Validation snippet (id, num_blocks, test_mode, template_values, runtime_values); validate if everything is OK. If not return a string as error message (which you can make a templates variable so you can set it in the test editor).
- IsAnswered snippet (id, num_blocks, test_mode, template_values, runtime_values); determine if this question is answered or not. Used for progress bars.
- Generator snippet (id, num_blocks, template_values); Instead of entering a HTML template you can also generate this in code. return a string with generated HTML and it will replace the content in the HTML template box
- Generator snippet PnP (id, num_blocks, template_values); Instead of entering a HTML template you can also generate this in code. return a string with generated HTML and it will replace the content in the HTML template for PnP input box
With the show previews button you can try out your template in the "Preview section"
Buttons on this screen are the following :
- Save screen template; save the screen template
- Copy this template; copy this template to a new one. Immediately change the name!
- Delete this template; delete this template. This is irreversible! Use with care.
- Download template definition; Download the definition as a .itrscreentemplate file
- Upload template definition; Upload the definition from a .itrscreentemplate file