[Webtest] Simplification: making <configuration> optional
Lothar Märkle
webtest@lists.canoo.com
Thu, 12 May 2005 20:56:11 +0200
On Thu, May 12, 2005 at 06:32:52PM +0200, F.Foerster@dpcom.de wrote:
> Hi Marc,
>
> I'm trying to do the simple Test and get the following error:
>
>
> D:\Work\prospectus\test\blackbox\webtest>webtest -buildfile first.xml
> "C:\j2sdk1.4.2_04\bin\java.exe" -Xms64M -Xmx256M -cp "D:\Work\WebTest\lib\runtime\ant.jar;D:\Work\WebTest\lib\runtime\op
> \runtime\xercesImpl-2.6.2.jar;D:\Work\WebTest\lib\runtime\xmlParserAPIs-2.2.1.jar;D:\Work\WebTest\lib\runtime\xalan.jar;
> nit.jar;D:\Work\WebTest\lib\build;D:\Work\WebTest\lib\build\clover.jar" org.apache.tools.ant.Main -buildfile first.xml
> Buildfile: first.xml
>
> ask-google:
>
> BUILD FAILED
> file:D:/Work/prospectus/test/blackbox/webtest/first.xml:7: Could not create task or type of type: testSpec.
since the example was not a complete working ant buildfile, only a target spec.,
the necessary <taskdef...> for webtest is missing, and your error is an
ant issue:
<project>
<property name="webtest.home" value="/opt/java/webtest"/>
<property name="junit.classpath" value="/usr/share/java/junit.jar"/>
<taskdef file="${webtest.home}/webtestTaskdefs.properties">
<classpath>
<fileset dir="${webtest.home}">
<include name="lib/*.jar"/>
<include name="lib/base/*.jar"/>
<include name="lib/optional/*.jar"/>
</fileset>
<fileset file="${junit.classpath}"/>
<pathelement path="${webtest.home}/lib"/>
</classpath>
</taskdef>
<target name="ask-google">
...
</target>
</project>
since this depends on your local setup, where you installed webtest and
junit, i left it out.
lothar