[Webtest] cannot get <scriptStep> to work - ClassNotFoundException: org.apache

Paul King webtest@lists.canoo.com
Sat, 22 Apr 2006 22:45:35 +1000


Hi Chris, sorry I was working from memory in the last post.
You will need the following (slightly different):

    <target name="bootstrap">
       <java classname="org.apache.tools.ant.Main" fork="true"
           classpathref="webtest.path.id" >
           <sysproperty key="webtest.home" value="${webtest.home}"/>
           <arg line="-f ${ant.file} testJsUnit"/>
       </java>
    </target>

Cheers, Paul.

Chris Gerrard wrote:
> Thanks Paul,
> 
> It didn't work.
> I made a new build file with the bootstrap target, set the default to it and
> ran webtest with this output:
> -----------------------
> Buildfile: bootstrap.xml
> Trying to override old definition of task sleep
> 
> bootstrap:
> 
> BUILD FAILED
> C:\Java\webtest\doc\doc\samples\bootstrap.xml:14: Reference
> ${webtest.path.id} not found.
> -----------------------
> 
> Looking through the various files I found this reference in
> C:\Java\webtest\lib\classpath.xml:
> -----------------------
> 	<dirname property="webtest.classpath.dir"
> file="${ant.file.webtestClasspath}" />
> 	<path id="webtest.path.id">
> 		<!-- to find webtest's log4j properties -->
> 		<pathelement location="${webtest.classpath.dir}/"/>
> 		<fileset dir="${webtest.classpath.dir}" includes="*.jar"/>
> 		<fileset dir="${webtest.classpath.dir}" includes="optional/*.jar"/>
> 		<fileset dir="${webtest.classpath.dir}" includes="plugins/**/*.jar"/>
> 		<fileset dir="${webtest.classpath.dir}" includes="runtime/*.jar"/>
> 	</path>
> -----------------------
> 
> I tried putting this code in my build file and it didn't improve things.
> 
> I've tried figuring this out, but my Ant isn't good enough, I'm afraid.
> 
> Any suggestions?
> 
> Chris
> 
> --
> View this message in context: http://www.nabble.com/cannot-get-%3CscriptStep%3E-to-work---ClassNotFoundException%3A-org.apache.bsf.engines.javascript.JavaScriptEngine-t1484027.html#a4030564
> Sent from the WebTest forum at Nabble.com.
> 
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
> 
>