This topic explains how to customize a Responder suite’s properties. Topics include:
Note that many options available for Responder suites are also available for action suites.
Accessing the Responder Suite Configuration Panel
To customize Responder suite properties, double-click its Virtual Asset Explorer node and use the controls that open in the configuration panel (on the right side of the GUI).
Recording Notes
If you want to associate any notes with the Responder suite (e.g., a description of what it covers), you can do so in the Notes tab of the configuration panel.
Defining Variables
The Variables tab allows you to configure variables that can be used to simplify tool definition and create flexible, reusable tools. After a variable is added, tools can parameterize against that variable.
Understanding Variables
You can set a variable to specific value, then use that variable throughout the current Responder suite to reference that value. This way, you don’t need to enter the same value multiple times—and if you want to modify the value, you only need to change it in one place.
As an alternative to manually setting a variable to a specific value, you can have a data bank tool (e.g., XML Data Bank) or Extension tool set the value of that variable "on-the-fly."
Variables are available as parameterized values within tool configuration panels (using the ${env_name} convention), as well as through scripting with com.parasoft.api.ExtensionToolContext.getValue(String) and setValue(String, String). Values are of type string, integer, boolean.
Variable values hold their values within the responder suite until the virtual asset is redeployed. This allows stateful virtualization scenarios. For example, assume you chained an XML Data Bank to the incoming request of a Message Responder. If you choose a variable as the target destination for the value (in the "Data Source Column" section of the extracted XPath), you can parameterize outgoing response messages with that variable from the same responder or from a different responder in this responder suite. Similarly, updating the variable value using the scripting API will result in the variable value persisting across multiple responder invocations. Redeploying the asset will erase the variable and reset it to the value that it is initialized within the variable editor (covered below).
Note that if the variable value is updated, then the new value will be used whenever the variable is accessed by a form view or by the scripting API. However, the variable declaration in the variables editor will not change. The variables editor will always display the initial value: the value that the variable will assume if the virtual asset is redeployed.
Adding Variables
You can add a new variable as follows:
- Click the Add button.
- Enter a new variable name in the Name field.
- Select either Integer, Boolean, String, or DataSource from the Type box.
- (For data source type only) Specify the name of the data source and column where the appropriate variables are stored. The data source should be in the parent Responder suite (the Responder suite that references the current Responder suite).
- Enter the variable value in the Value field. If you chose Use local value, the variable will always be set to the specified value (unless it is reset from a data bank tool or Extension tool). If you chose Use value from parent responder suite, the value specified here will be used only if a corresponding value is not found in the parent Responder suite.
- Click OK.
Using Variables
Once added, variables can be...
- Used via the "parameterized" option in tool fields.
- Reset from a data bank tool (e.g., an XML Data Bank as described in Configuring XML Data Bank Using the Data Source Wizard).
- Referenced within text input fields via the {var_name} convention.
Monitoring Variable Usage
To configure Virtualize to show what variables are actually used at runtime, set Console preferences (Parasoft> Preferences> Parasoft> Console) to use normal or high verbosity levels.
The Console view (Show View> Parasoft> Console) will then display variables used at runtime.
Viewing such variables is useful for diagnosing the cause of any issues that occur.
Specifying SOAP Options
You can customize the following options related to SOAP messaging in the SOAP Options tab of the configuration panel:
- Attachment Encapsulation Format: Select Custom from the drop-down menu and select either MIME or DIME, MTOM Always, or MTOM Optional. The default value is MIME. See Working with Attachments for details.
- SOAP Version: Select Custom from the drop-down menu and select either SOAP 1.1 or SOAP 1.2. The default value is SOAP 1.1.
- Outgoing Message Encoding: Choose Custom from the drop-down menu and choose an encoding for the outgoing message. The default is to use the encoding specified in the Misc. or SOAP settings in the Parasoft Preferences (see Additional Preference Settings ).
- Constrain to WSDL: Determines if responder messages are constrained to the specified WSDL.