[Dev] Jython <run> Node keeps updating and exception
Frank Cohen
fcohen at pushtotest.com
Fri Jul 13 14:19:38 PDT 2007
I changed the Jython TestScenario to not use any imported classes (no
imports.) I see in catalina.out that the Jython script operates
correctly. However, the test throws an exception:
Running a functional test
Executing time 0
jython
starting
frankolo cohenovitz
done
Exception in thread "Thread-39" java.lang.NoSuchMethodError:
javax.script.Invocable.invokeFunction(Ljava/lang/String;[Ljava/lang/
Object;)Ljava/lang/Object;
at
com.pushtotest.testmaker.XSTest.xml.TestScenario.ScriptRunner.argumentsF
ormCallScript(ScriptRunner.java:458)
at
com.pushtotest.testmaker.XSTest.xml.TestScenario.ScriptRunner.argumentsF
romCall(ScriptRunner.java:419)
at
com.pushtotest.testmaker.XSTest.xml.TestScenario.ScriptRunner.setupMetho
dForTest(ScriptRunner.java:225)
at
com.pushtotest.testmaker.XSTest.xml.TestScenario.ScriptRunner.setMethods
(ScriptRunner.java:213)
at
com.pushtotest.testmaker.XSTest.xml.TestScenario.ScriptRunner.<init>
(ScriptRunner.java:192)
at
com.pushtotest.testmaker.XSTest.xml.TestScenario.TestusecaseRunner.runOn
eTime(TestusecaseRunner.java:346)
at
com.pushtotest.testmaker.XSTest.xml.TestScenario.TestscenarioRunner.runF
unctionaltest(TestscenarioRunner.java:288)
at
com.pushtotest.testmaker.XSTest.xml.TestScenario.TestscenarioRunner.acce
ss$000(TestscenarioRunner.java:91)
at
com.pushtotest.testmaker.XSTest.xml.TestScenario.TestscenarioRunner
$FunctionalTest.run(TestscenarioRunner.java:272)
And in the output panel is see:
XML Scenario: /Users/frankcohen/dev/cvs/tm5/testmaker_distribution/
example_agents/dplExample/test_jython.xml
Module File: ./example_agents/dplExample/DPLExample2.py
- Loading Scenario -
The node localhost is valid
The node localhost has loaded the scenario
Node: localhost Done test: 0
Node: localhost Done test: 0
Node: localhost Done test: 0
Node: localhost Done test: 0
Node: localhost Done test: 0
Node: localhost Done test: 0
Node: localhost Done test: 0
Node: localhost Done test: 0
Node: localhost Done test: 0
Node: localhost Done test: 0
Node: localhost Done test: 0
Node: localhost Done test: 0
Node: localhost Done test: 0
Node: localhost Done test: 0
Node: localhost Done test: 0
Node: localhost Done test: 0
Node: localhost Done test: 0
Node: localhost Done test: 0
Node: localhost Done test: 0
Node: localhost Done test: 0
Node: localhost Done test: 0
Node: localhost Done test: 0
Node: localhost Done test: 0
Node: localhost Done test: 0
Node: localhost Done test: 0
Node: localhost Done test: 0
Node: localhost Done test: 0
Node: localhost Done test: 0
Node: localhost Done test: 0
Node: localhost Done test: 0
Node: localhost Done test: 0
Node: localhost Done test: 0
These Node: messages continue to appear approximately every 15 seconds.
-Frank
On Jul 13, 2007, at 10:45 AM, Luis Carlos Lara López wrote:
> 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.argument
> sFormCall
> Script(ScriptRunner.java:450)
> at
> com.pushtotest.testmaker.XSTest.xml.TestScenario.ScriptRunner.argument
> sFromCall
>
> 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
>
>
> _______________________________________________
> Dev mailing list
> Dev at lists.pushtotest.com
> http://lists.pushtotest.com/mailman/listinfo/dev
>
--
Frank Cohen, PushToTest, http://www.PushToTest.com, phone 408 374 7426
TestMaker: The open-source SOA test automation tool
More information about the Dev
mailing list