This topic describes how to configure and work with different environments. In this section:
Table of Contents | ||
---|---|---|
|
Understanding Environments
Environments are collections
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 within fields of your test configuration.You can use environment variables to specify endpoints, database table names, connection properties, such as login credentials, etc. The names of variables will be substituted with the assigned values in the active environment. By changing switching which Environment environment is the "active" environment, you can quickly and easily change which values SOAtest usesdynamically switch the environment-specific values at runtime.
Environments are automatically defined during generation from a WSDL, by recording when you generate a Parasoft asset from a browser, or through another process. In addition, you can manually define one 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 the
test suite’s Test Case Explorer node.
The Environments branch is created by default when a new test suite is created.
...
- 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.
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
Anchor | ||||
---|---|---|---|---|
|
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: ${env_name}
.
...