Thanks for your reply,...
I tried the code you sent, but the same output, the jruby interpreter
instance is returned as NULL.
Ahmed
Yoko Harada wrote:
On Thu, May 14, 2009 at 9:27 AM, Charles Oliver Nutter
<[email protected]> wrote:
Is the JRuby jar file present on classpath somewhere in the JUnit without
JTestR case? I believe JTestR's jar bundles JRuby.
Plus, check version compatibility. JSR223 JRuby engine work with JRuby
1.1.6 or before.
Does JTestR use customized classloader to lauch test code? If you set
the classloader like:
ScriptEngineManager m = new ScriptEngineManager(getClass().getClassLoader());
you might get engin's instance.
-Yoko
Ahmed Abdelsalam wrote:
I'm trying to build ant script to use it in conjunction with JTestR to
test my eclipse plugin. The plugin is working correctly, and JTestR is
working correctly through JUnit interface. However, writing ant script to
perform the same tests (performed successfully by JUnit interface) causes an
error. here is the piece of code that gives error:
ScriptEngineManager m = new ScriptEngineManager();
m.registerEngineName("jruby",
new com.sun.script.jruby.JRubyScriptEngineFactory());
engine = m.getEngineByName("jruby");
ScriptContext context = engine.getContext();
The error is that engine has not returned successfully from the
getEngineByName("jruby"), it's NULL. This doesn't happen in normal plugin
operation nor JUnit interface testing. It's only with ant.
Here is the ant build.xml script:
<?xml version="1.0" encoding="UTF-8"?>
<project name="myproject" basedir="." default="test">
<target name="test" description="Runs all tests">
<taskdef name="jtestr"
classname="org.jtestr.ant.JtestRAntRunner" classpath="lib/jtestr-0.4.jar"/>
<jtestr outputLevel="VERBOSE" port="20333" tests="tests"/>
</target>
<target name="test-server" description="Starts test server">
<taskdef name="jtestr-server"
classname="org.jtestr.ant.JtestRAntServer" classpath="lib/jtestr-0.4.jar"/>
<jtestr-server port="20333" runtimes="3"/>
</target>
</project>
Any help?
Ahmed
--------------------------------------------------------------------- To
unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
|