5.6. Insert the Template

The template is available now and can be manipulated inside a test case's operation. In the test case editor, drag'n'drop the Add Template symbol from the palette to the operation of the first event. Select the request template, by using the Browse button.

Figure 5.8. Create a new template

Create a new template

This template shall be used to send a request to the server to retrieve the course list. Therefore, the type of the message has to be set to the value getCourseList . As the type node is defined in the template, a substitution can be used to insert this value. Press the Add Substitution button, select Constant Path in the new wizard window and enter the XPath /request/type to address the type node which will be highlighted.

Figure 5.9. Setting the path of a substitution

Setting the path of a substitution


Press Add Constant , enter getCourseList and use the OK buttons to finish adding the substitution.

Figure 5.10. Added substitution of type node

Added substitution of type node


As the getCourseList request does not have any parameters, the parameters node of the message has to be removed. Press the Add Omission button, select Constant Path in the new wizard window, enter /request/parameters as the Constant Path and press OK.

Figure 5.11. Setting the path of an omission

Setting the path of an omission