[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qftestJUI] Question concerning QF-Test procedures and variable bindings.
Hi Greg, Many thanks for the prompt response. For me personally, I would like to see 'Immediate variable expansion' as the default for $(xxx). I failed to notice the problem this 'Lazy variable expansion' is causing in my test-suite until the last few days. Basically, I have quite a few procedures (in what is now a fairly sized test-suite) which mimic the behaviour shown in my 'proc1'/ 'proc2' example. Further example : File: MV38NM.qft package: wndNetworkManagement procedure: waitForWndToAppear( timeout : default = $(timeout.waitForWnd) ) where $(timeout.waitForWnd) is a test-suite variable i.e. global. the above in turn calls, File: component.qft Procedure: waitForComponent( $(comId), $(timeout) ) this procedure has no defaults for the parameter values. If the caller of 'MV38NM.wndNetworkManagement.waitForWndToAppear' provides an empty parameter list in their 'call procedure' node, then the value of $(timeout) within the scope of the procedure 'component.waitForComponent', ends up as "" (i.e. an empty string). Whereas, I was expecting that in this case $(timeout) would be equal to $(timeout.waitForWnd) . If 'Lazy variable expansion' remains the default for $(xxx) then I would have to go through and change all the relevant parameter values from $(xxx) to $!(xxx). Although in fairness this can be done quickly and easily (i.e. search & replace). Never-the-less, my preference is 'Immediate variable expansion' as the default for $(...). Regards Adrian