Mailing list - Entries of 2006


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

[qftestJUI] problem with setLocal(key, None) in a jythonScript


  • Subject: [qftestJUI] problem with setLocal(key, None) in a jythonScript
  • From: Lionel Deliége <Lionel.Deliege@?.com>
  • Date: Tue, 21 Mar 2006 17:13:46 +0100

Hi everyone,

For some of our tests, we need to launch them dynamically using an excel file as data source.  In some case too, we must reset some variable to None.  But when we do setLocal(“name”, None), we have this error in the log:

 

de.qfs.apps.qftest.run.ScriptException: The script failed with the following message:

Traceback (innermost last):

  File "<string>", line 1, in ?

  File "C:\Program Files\qfs\qftest\qftestJUI-1.08.4\jython\Lib\qftestJUI.py", line 68, in runscript

  File "C:\Program Files\qfs\qftest\qftestJUI-1.08.4\jython\Lib\qfcommon.py", line 305, in runscript

  File "<string>", line 11, in ?

  File "C:\Program Files\qfs\qftest\qftestJUI-1.08.4\jython\Lib\qfcommon.py", line 209, in setLocal

java.lang.NullPointerException

            at java.util.Hashtable.put(Hashtable.java:393)

            at de.qfs.apps.qftest.run.AbstractRunContext.setLocal(AbstractRunContext.java:3686)

 

This is the original script:

 

i=0

proc = "";

for key in data[0] :

            if key == 'procedureName' :

                        proc = data[$(iii)+1][i];

                        rc.logMessage(proc)

            else :

                        if data[$(iii)+1][i] == '//d':

                                   try:

                                               rc.lookup(key)

                                               rc.setLocal(key, None);

                                               #rc.logError("var définie: " + rc.lookup(key))

                                   except UnboundVariableException:

                                               rc.logMessage("variable non définie")

                        else :

                                   rc.setLocal(key,data[$(iii)+1][i]) ;

                                   rc.logMessage(rc.lookup(key))

            i=i+1

rc.callProcedure(proc, parameters=None)

rc.callProcedure(rc.lookup("cleanupProcedureName"),parameters=None)

 

Has someone an idea to correct this problem?

 

Thanks, Lionel


Lionel Deliége ( Lionel.Deliege@?.com)
Consultant
 
BSB Belgium (www.bsb.com )
Place de l'Université 25/10 - B-1348 Louvain-la-Neuve
T:+32 (0)10 48 97 20 - F:+32 (0)10 48 34 99


BUSINESS SOLUTIONS BUILDERS DISCLAIMER
This e-mail message and any attachments are intended exclusively for the addressee(s) and may contain information which is confidential and/or protected by intellectual property rights. If you receive this e-mail by mistake, please notify immediately the sender, or Business Solutions Builders (by e-mail at disclaimer@?.com), and delete the message and any attachments without printing, copying or opening it. Any disclosure, reproduction, distribution or use of this message or any attachments, by persons other than the designed addressee(s), is strictly prohibited. E-mail transmission and Internet use cannot be guaranteed to be secure. Business Solutions Builders and its subsidiaries cannot be held responsible for any loss, delay or damage arising from their use.



Videos Downloads Documentation Buy Free Trial