Search code examples
parametersalmhp-quality-center

Propagating ALM parameters between called sub tests


In HP ALM/QC, given :

  • a Template Test T1 with a parameter P1
  • a Template Test T2 with a parameter P2

Can I make T1 call T2 with the value of P1 inserted into P2?

In T1 I tried to call T2 and pass "<<< P1 >>>" as the value for P2, but it did not work : when I made a new test T3 calling T1 with an actual value for P1, the parameter P2 ended up with the raw value "<<< P1 >>>" instead of the value of the parameter P1.

Thank you!


Solution

  • No, not directly.

    Two things can be passed as a parameter value:

    • The value of another parameter (using the {} syntax)
    • A literal value

    which means you cannot pass any kind of expression, not even the simplest form concatening two parameter values with {paramname1}{paramname2}, or a parameter value and a literal value.

    A possible workaround is to process the Parameter value programmatically before using it.

    For example, you could replace all instances of with the value of Parameter named paramname in the string that Parameter() delivers.

    (Be aware, however, that simply doing search-and-replace might not always be enough, you might need to create a parser for the syntax you create.)