Understanding Virtualize Environments
An environment is a collection This topic describes how to configure and work with different environments. In this section:
|Table of Contents|
Environments are collections of variables that can be referenced in your Virtualize Responder suite or within fields of your responder or action suite. An environment might You can use environment variables to specify endpoints, database table names, connection properties, such as usernames and passwords, database table nameslogin credentials, etc. Virtualize will substitute the The names of variables will be substituted with the assigned values assigned to those variables in the active environment. By changing switching which Environment environment is the "active" environment, you can quickly and easily change which set of values Virtualize uses. dynamically switch the environment-specific values at runtime.
Environments can also be used to switch virtual asset modes. For example, assume you configured a responder to forward traffic to an external endpoint. By using an environment variable for the endpoint (instead of a fixed value), you can easily redirect message forwarding to different endpoints. This allows .pva files to act like proxies; one environment can point to a real asset while another points to a virtual asset.
Environments are automatically defined when you automatically generate a Responder suite (e.g., Parasoft asset from a WSDL). In addition, definition, such as WSDL, but you can also manually define one environments as described below.
Manually Defining an Environment
Creating and switching environments is done through the Environments branch of the the
Responder suite’s Virtual Asset Explorer node.
The Environments branch is created by default when a new Responder suite is created.
- Right-click the Environments node , then and choose NewEnvironment.
- In the configuration panel that opens on the right, use the available controls to define environment variables.Rename the environment (optional) and click on a field in the table to define environment variables and values.
Masking a Variable Value
You can right-click on a variable and choose Mask Variable Value to hide the value in the interface.
Using Environment Variables in Tests and Tools
Environment variables can be accessed in test or tool configuration fields using a special syntax. To reference a variable, enclose the variable name in the following character sequence: