Overview

Template is used for defining the response of the service. One service can have one or more than one response, based on request or the test conditions.

If a service has two responses – one for successful response and one for an erroneous response, then the user needs to define two templates. In case of multiple templates, the user needs to provide condition logic for the selection of the template for the service response.

Service Virtualization evaluates the condition of all the templates in sequence and uses the first template whose condition is met. Users can have one template with no condition which becomes the default template in case no condition is met.

  1. Order: It shows the order in which the condition will be evaluated.
  2. Template Name: It is a list which contains the names of templates available in current service. Response comes by the selected template.
  3. Mode: There are two types of modes:
    1. Simulate: This template type indicates the simulation of service on Service Virtualization. If template type is 'Simulate', then Service Virtualization responses for the corresponding request.
    2. Forward: This feature is used to forward a request from Service Virtualization to a specified endpoint.
  4. Service Time(ms): It shows the response time delay applied over the template for static and correlated URL.
  5. Template Selection Condition: It shows the conditions applied to the template . There will be one default template in this list that will respond when no condition is met. In case there are multiple templates with no condition only one will be setted as default and others will go in inactive mode.
  6. Status: It shows the status of the job. The status can either be Active or can be Inactive. Users can change the status of the template using the toggle button.
  7. Action: In action, there are following options mentioned below:
    • Template Based Test: This option is used to test the response at the template level.
    • Update: This option allows you to update or edit the template.
    • Delete: This option allows you to delete alternate service.
    • Settings: This option allows to apply following settings at template level
      1. Header : This option is used to add headers in templates.
      2. Service Time : This option is used to add service time delay in templates.
      3. Trace Level : This option is used to add trace level to a specific template.
      4. Template Mode: This feature is used to change the mode of the template from simulate to forward and vice versa 
      5. Chunk Encoding: This indicates the length of the content. Enabling this will indicate the content length of the template.
      6. Protobuf Settings : Here users can change or add the protobuf settings if required.

Global icons