Using Parameters in Test Cases
Every test case can be parameterized by using parameters when editing the test case's definition. A parameter is defined by using the ${parametername} notation in the wiki text of the test cases. For example, the speed parameter is used in the name field of this test:
You can use any name for your parameters. The parameter is automatically recognized by Codebeamer, and the ${parametername} placeholder is automatically filled in with the actual value during the run-time of the test.
Parameters can be used in the following locations:
Name of the test case.
Description of the test case.
Pre- and post- actions of the test-case.
In the Action and Expected result fields of test steps.
Default Values for Parameters
When adding parameters to test case definitions, you can also provide default value to the parameter. You can do this by using the ${parameterName|defaultValue} format. The | (pipe) character is used to separate the parameter and its default value.
For example, ${car|bmw} defines a parameter named car and the default value for this parameter is bmw.
The default value is only used if the parameter is not given any other value. If a value is provided in the container test set, in the test case, or in one of its parent test cases, then the default value is ignored.
Empty String Values in Parameters
If a parameter has an empty string value such as " " (a single space), it is handled as if the parameter is missing. In this case the default value of the parameter is used, if one has been provided.
Was this helpful?