List Icon
Archiv Mailingliste

2019 bis Juli 2022  2018  | 2017 2016 2015 | 2014 | 2013

Die Mailingliste ist seit Juli 2022 geschlossen, dient aber weiterhin als Informationsarchiv zu QF-Test.
Wenn Sie aber über Neuerungen zu QF-Test informiert bleiben wollen, können Sie einfach unseren
Newsletter abonnieren

Um aktuell die Informationen zu jeder Release - auch Minor Releases - zu bekommen, können Sie den
RSS-Feed abonnieren oder uns in sozialen Medien folgen.
Alternativ bietet QF-Test auch selbst eine Versionsinformation an.

Eine weitere Informationsquelle ist unser Blog, in dem es aktuelle Beiträge zu allgemeinen Themen, zur Firma QFS und auch diverse "How-Tos" gibt:
Blog abonnieren


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

Re: [QF-Test] procedure returning None as result


  • Subject: Re: [QF-Test] procedure returning None as result
  • From: Michael Höber, QFS Support <support@?.de>
  • Date: Thu, 25 Apr 2013 09:53:58 +0200

Hello,

 

it's essential to know the difference between $() and rc.lookup() regarding the expansion of 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 details and examples please see:

http://www.qfs.de/qftest/manual/en/user_scripting.html#usec_scriptvars

 

Best regards,

     Michael

 

--

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 Chugunov, Alexey
Sent: Wednesday, April 24, 2013 11:47 AM
To: qftest-list@?.de
Cc: Mikhailov, Grigory; Lavrentyev, Andrey
Subject: [QF-Test] procedure returning None as result

 

Hello.

 

I have this procedure which consists of jython SUT script and a return:

I get exception when I try to return None as the return value, as it unsets the “result” local var.

What is the recommended way to return “None” value from a procedure?

Some arbitrary string like “false”?

 

1.       Sut jython script (details skipped)

result = None       

rc.setLocal("result", result)

 

2.       Return $(result)

 

The return causes exception if result is set to None

cid:image001.png@?.6BF12410

 

 

Alexey Chugunov

Mera, GMT+4

Mayak 30104C phone: 4240 (redirected to mobile if no answer)