[Dev] Jython and <resources>

Luis Carlos Lara López llara at AVANTICATEC.NET
Fri Jul 13 10:45:43 PDT 2007


Hi Frank

With the Jython test we have 3 problems, in the TestScenario, in the Jython and in Tomcat.
 2 of them are solved now

TestScenario a missing tag to inform the tomcat about the module

<run name="test1" testclass="DPLExample" method="runTest" langtype="jython"/>
<run module="JythonClass" name="test1" testclass="DPLExample" method="runTest" langtype="jython"/>


In the Jtyhon file, the standard method class class constructor get+Name of the class
def getDPLExample():
    return DPLExample()


In Tomcat, it seems there is a problem with the imports

javax.script.ScriptException: Traceback (innermost last):
  File "<unknown>", line 10, in ?
ImportError: No module named pushtotest
        at com.sun.script.jython.JythonScriptEngine.evalCode(JythonScriptEngine.java:292)
        at com.sun.script.jython.JythonScriptEngine.eval(JythonScriptEngine.java:170)
        at com.sun.script.jython.JythonScriptEngine.eval(JythonScriptEngine.java:175)
        at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:232)
        at com.pushtotest.testmaker.XSTest.xml.TestScenario.ScriptRunner.argumentsFormCall
Script(ScriptRunner.java:450)
        at com.pushtotest.testmaker.XSTest.xml.TestScenario.ScriptRunner.argumentsFromCall

Without the imports, the test works fine, but with the imports, it seems to be a problem with the jython engine. I am working to find out what is the problem

Hope this was useful
LC


-----Original Message-----
From: dev-bounces at lists.pushtotest.com
[mailto:dev-bounces at lists.pushtotest.com]On Behalf Of Frank Cohen
Sent: Friday, July 13, 2007 10:57 AM
To: PushToTest TestMaker Developers List
Subject: Re: [Dev] Jython and <resources>
Importance: High


See attached files. Thanks. -Frank




More information about the Dev mailing list