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
Parameter values can be assigned to both test cases and test sets. Both the test cases and test sets can be organized into tree-hierarchies, for example any test case or test 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 that are defined on higher levels.
As a best practice, group functionally similar test cases below a parent or container test case, and group functionally similar test cases under one test set or hierarchy of test 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 searches for the missing parameters in the hierarchies from the bottom-up in the following order:
1. Checks 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.
This search stops when a value is found for all of the parameters For example, if all of the parameters have some value on the current test case ,then no parents are scanned at all.
In the following example, the search for the parameter values is performed in this order:
It is possible that multiple parameters sets are defined at different levels of the scanned hierarchy. These parameter sets are kept and mergerd if necessary to produce a complete parameter set. For more information , see Parameter Resolution: Inheritance and Merging
Was this helpful?