A configuration is a named collection of properties that usually specify environment-specific values for the system under test.
By removing hard-coded environment data from the test case, you can run the same test on different environments by simply using a different configuration. Configurations are used everywhere in DevTest: for example, in a test case document, test suite document, staging document, test case execution, or test suite execution.
A configuration must be defined at the project level. You can specify the values of these properties at the beginning of a test case.
The default configuration of any project is project.config. You can create more configurations in a project and can make one active for a specific test case or suite.
If you create a configuration, you are not able to add any new keys in it. To add keys in the new config, add them in the project.config file. You can then select the newly defined keys added in the project.config file from the drop-down available in the new config file.
Properties are added to your configuration automatically while you develop your test.
For example, when you enter the WSDL name in a test, the defined server name and port are replaced with properties such as WSSERVER and WSPORT. The values of these properties are automatically added to your default project configuration. Now you can change the location of the web service merely by editing the configuration, rather than looking for hard-coded values in several test steps.
As another example, when you work with Enterprise JavaBeans (EJBs) or Java objects, you can switch hot deploy directories, or add extra JAR files to your class path, to use different versions of your Java code. Two standard properties exist for these locations: HOT_DEPLOY and MORE_JARS. You can set these properties in your configuration.
For information about other properties, see Properties.
Configurations are for storing properties that are related to the system under test. Avoid using them for storage of "test-like" parameters and global parameters. These parameters can be stored in a companion.
Note: Backslashes "\" are not preserved in configuration files. If you edit the config file manually and you add something with a backslash, the file is overwritten without the backslashes.
A configuration file is a text file with a .config extension that contains the properties as key/value pairs. Configuration files are integral to any test run.
Configuration files can be created or edited in any text editor and can be saved with a .config extension.
When starting a test run, you can select a configuration file. For more information, see Apply a Configuration While Running a Test Case in Using CA Application Test.
We recommend that you establish a naming convention for configuration files, making it easier to identify alternate configurations.
These configuration files must be imported into DevTest.
Copyright © 2014 CA Technologies.
All rights reserved.
|
|