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 action suite. An environment might specify endpointswithin fields of your responder or action suite, as well as your test configurations.You can use environment variables to specify endpoints, database table names, connection properties, such as usernames and passwords, database table names, etc. Virtualize will substitute the login credentials, etc. 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., from a WSDL). In addition, you can manually define one as described below.
Understanding SOAtest Environments
You may want to run the same test suite against other target systems (different testing environments, production environments, etc.). You can use SOAtest Environments to decouple configuration settings from your test data. Once you have configured environments for your test suites, running tests against another systems is as easy as clicking a button.
An environment is a collection of variables that can be referenced in your SOAtest test suite. When running a test, SOAtest will substitute the names of variables with the values assigned to those variables in the active environment. By changing which Environment is active, you can quickly and easily change which values SOAtest uses.
Environments are automatically defined during generation from a WSDL, by recording from a browser, or through another process. In addition, you can manually define one Parasoft asset from a definition, such as WSDL, but you can also manually define environments as described below.
Manually Defining an Environment
Creating and switching environments is done through the Environments branch of the test suite’s the
test suite's Test Case Explorer or Responder suite's Virtual Asset Explorer node.
The Environments branch is created by default when a new test suite or Responder suite is created.
To add a new environment:
- Right-click the Environments node , then and choose New Environment.
- In the configuration panel that opens on the right, use the available controls Rename the environment (optional) and click on a field in the table to define environment variables . Note that you can mask a value by right-clicking and choosing Mask Variable Value.
Manually Defining an Environment in Virtualize
Creating and switching environments is done through the Environments branch of the Responder suite’s Virtual Asset Explorer node.
The Environments branch is created by default when a new Responder suite is created.
To add a new environment:
- Right-click the Environments node, then choose New Environment.
- In the configuration panel that opens on the right, use the available controls 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.
Masking a value prevents the REST Client from showing the resolved value.
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: