Logo QF-Test

Finding valuable answers
in the Mailing List Archive.


Free Trial  Download  Buy

Thomas Max, QF-Test training and support

Use the full-text search on our web site to find helpful tips on the mailing list.

Thomas Max, 
Sr. Software Engineer & Trainer, QFS

2017 up to now  | 2016 | 2015 | 2014 | 2013 | 2012 | 2011 | 2010 | 2009 | 2008 | 2007

(older archive entries before 2007 are not shown here, but included in the onsite-search)

Mailing List - Entries of 2012

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [QF-Test] (no subject)

  • Subject: Re: [QF-Test] (no subject)
  • From: Michael Höber, QFS Support <support@?.de>
  • Date: Fri, 27 Apr 2012 08:35:49 +0200



Using QF-Test variables in Jython scripts is not difficult, but there are two viable ways to do so and it is important to understand the difference and which method to apply in which case.

First, standard QF-Test variable expansion takes place before (!) the script is parsed and executed, so you can use $(var) or ${group:name} style variables. In your case "var" is set during (!) the script is executed, but $(var) should get expanded before (!) the script is parsed, thus this won't work as you obviously cannot expand $(var) before setting it. To avoid that kind of problem you should make it a habit to use the run-context's 'lookup' method instead of $(var) (see http://www.qfs.de/qftest/manual/en/tech_scripting.html#sec_api_rc  for API reference).

Let's again stress the difference between the '$' and the rc.lookup methods for accessing variables: '$' expressions are expanded before the script is passed to the Jython interpreter. That means the text "$(var)" in the script is replaced by a verbatim copy of the value of the variable "var". The method rc.lookup however returns the value of "var" during the processing of the script.

For more information please see manual chapter 13.3.3 please:



Best regards,



Get the most out of QF-Test - through training directly from the authors

* via webinar       http://www.qfs.de/en/info/OnlineTraining_QF-Test.pdf

* here at QFS             http://www.qfs.de/en/info/Training_QF-Test.pdf


QFS Support - Michael Hoeber            

Quality First Software GmbH                http://www.qfs.de

Tulpenstr. 41                         Tel: +49 8171 38648-20

DE-82538 Geretsried                   Fax: +49 8171 38648-16

GF: Gregor Schmid, Karlheinz Kellerer     HRB München 140833



From: qftest-list-bounces@?.de [mailto:qftest-list-bounces@?.de] On Behalf Of brahim tarnaoui
Sent: Thursday, April 26, 2012 5:05 PM
To: qftest-list@?.de
Subject: [QF-Test] (no subject)




how to display the var variable??



this is my script:

rc.setLocal("var", "123")




when executing it, i get this error's dialog box in attachments.










Videos Downloads Documentation Buy Free Trial