User's Guide > About the User's Guide > Codebeamer QA: Test Management > Test Parameterization > Sharing Parameter Values Between Test Cases and Test Sets: Parameter Inheritance
Sharing Parameter Values Between Test Cases and Test Sets: Parameter Inheritance
The parameter values can be assigned to both Test Cases and Test Sets. Both the Test Cases and Test Sets can be organized to tree-hierarchies (i.e. any Test Case/Sets can have a parent and many children). These parent-child hierarchies of the Test Cases and Test Sets are used when looking for the parameter values, as the child elements inherit the parameter values defined on higher levels.
Practically it is recommended that the functionally similar Test Cases are grouped below a parent/container Test Case, and/or the functionally similar Test Cases are grouped to one Test Set or hierarchy of sets. Maintaining this hierarchy makes it easy to share parameter values between the Test cases and Test sets by defining the values on the parent elements.
How inheritance works: the search for parameter values
When a -parameterized- test runs, the Test Runner will search for the missing parameters in the following hierarchies bottom-up as:
1. If the current Test Case contains values.
2. Scans all parent Test Cases of the current Test Case.
3. Checks the current Test Set which is being run.
4. Scans all parent Test Sets.
In the following example, the search for the parameter values is performed in this order:
This search stops when a value is found for all the parameters. (For example, if all the parameters have some value while the test case is undergoing a scan, then no parents will be scanned at all.).
In this search it is possible that multiple parameter sets are defined at different levels of the scanned hierarchy. These parameter sets are kept and merged if necessary to produce a complete parameter-set. The details of that is explained in Advanced: Parameter resolution inheritance and merging.
Was this helpful?