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

Reply via email to