Mailingliste - Einträge 2006


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

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


  • Subject: Re: [qftestJUI] problem with setLocal(key, None) in a jythonScript
  • From: Gregor Schmid <Gregor.Schmid@?.de>
  • Date: 21 Mar 2006 19:28:38 +0100

Hi Lionel,

good one, that's an actual bug. I'll send you a patch.

Best regards,
    Greg


Lionel Deliége <Lionel.Deliege@?.com> writes:

>    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 ( [1]Lionel.Deliege@?.com)
>    Consultant
> 
>    BSB Belgium ([2]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

-- 
Gregor Schmid                                Gregor.Schmid@?.de
Quality First Software GmbH                     http://www.qfs.de
Tulpenstr. 41                                Tel: +49 8171 919870
DE-82538 Geretsried                          Fax: +49 8171 919876



Videos Downloads Dokumentation Kaufen Gratis Testen