[Webtest] Problem with SimpleTest.xml

Dierk Koenig webtest@lists.canoo.com
Tue, 6 Jul 2004 15:01:34 +0200


This is a multi-part message in MIME format.

------=_NextPart_000_0011_01C4636A.20C94100
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

try with
<fileset dir="e:/webtest/lib" includes="*.jar"/>
cheers
Mittie
  -----Original Message-----
  From: webtest-admin@lists.canoo.com
[mailto:webtest-admin@lists.canoo.com]On Behalf Of sumathi P
  Sent: Dienstag, 6. Juli 2004 14:12
  To: webtest-admin@gate2.canoo.com; webtest@lists.canoo.com
  Subject: [Webtest] Problem with SimpleTest.xml


    Hi ,
  This is my SimpleTest.xml ,
  -------------------------------------------------------
  <project name="SimpleTest" basedir="." default="main">

    <taskdef file="e:/webtest/webtestTaskdefs.properties">
        <classpath>
          <fileset dir="e:/webtest/lib" includes="e:/webtest/lib/*.jar"/>
         </classpath>
    </taskdef>

    <target name="main">
        <testSpec name="myTest">
          <config
              host="localhost"
              port="80"
              protocol="http"
              basepath="myApp" />
          <steps>
              <invoke
                stepid="get Login Page"
                url="login" />
              <verifytitle
                stepid="we should see the login title"
                text="Login Page" />
          </steps>
        </testSpec>
    </target>
  </project>
  -------------------------------------------------------
  When i tried to build that file using ....
  ant -d -buildfile SimpleTest.xml ,
  I'm getting the following Exception...
  -------------------------------------------------------
  E:\webtest\samples>ant -d -buildfile Test.xml
  Apache Ant version 1.6.1 compiled on February 12 2004
  Buildfile: Test.xml
  Adding reference: ant.PropertyHelper
  Detected Java version: 1.4 in: D:\j2sdk1.4.2_03\jre
  Detected OS: Windows XP
  Adding reference: ant.ComponentHelper
  Setting ro project property: ant.version -> Apache Ant version 1.6.1
compiled on February 12 2004
  Setting ro project property: ant.file -> E:\webtest\samples\Test.xml
  Adding reference: ant.projectHelper
  Adding reference: ant.parsing.context
  Adding reference: ant.targets
  parsing buildfile E:\webtest\samples\Test.xml with URI =
file:///E:/webtest/samples/Test.xml
  resolving systemId: file:///E:/webtest/samples/WebTest.dtd
  Setting ro project property: ant.project.name -> Test
  Adding reference: Test
  Setting ro project property: ant.file.Test -> E:\webtest\samples\Test.xml
  Project base dir set to: E:\webtest\samples
  +Target:
  +Target: main
  Could not load a dependent class
(com/sun/media/jai/codec/FileSeekableStream) for type image
  Could not load a dependent class (com/jcraft/jsch/UserInfo) for type
sshexec
  Could not load a dependent class (com/jcraft/jsch/UserInfo) for type scp
  Could not load a dependent class (org/apache/commons/net/SocketClient) for
type rexec
  Could not load class (org.apache.tools.ant.tasksdefs.cvslib.CvsVersion)
for type cvsversion
  Could not load a dependent class (com/starbase/starteam/Item) for type
stlist
  Could not load a dependent class (org/apache/commons/net/SocketClient) for
type telnet
  Could not load a dependent class (org/apache/commons/net/ftp/FTP) for type
ftp
  Could not load a dependent class (jdepend/xmlui/JDepend) for type jdepend
  Could not load a dependent class (junit/framework/TestListener) for type
junit
  Could not load a dependent class (com/starbase/starteam/Item) for type
stcheckin
  Could not load a dependent class (com/starbase/starteam/Item) for type
stcheckout
  fileset: Setup scanner in dir E:\webtest\lib with patternSet{ includes:
[e:/webtest/lib/*.jar] exc
  Finding class com.canoo.webtest.steps.verify.VerifyElementText

  BUILD FAILED
  E:\webtest\samples\Test.xml:8: taskdef class
com.canoo.webtest.steps.verify.VerifyElementText cann
          at
org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:460)
          at
org.apache.tools.ant.taskdefs.Definer.loadProperties(Definer.java:281)
          at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:214)
          at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
          at org.apache.tools.ant.Task.perform(Task.java:364)
          at org.apache.tools.ant.Target.execute(Target.java:301)
          at
org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:135)
          at
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:89)
          at org.apache.tools.ant.Main.runBuild(Main.java:617)
          at org.apache.tools.ant.Main.startAnt(Main.java:183)
          at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
          at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
  Caused by: java.lang.ClassNotFoundException:
com.canoo.webtest.steps.verify.VerifyElementText
          at
org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.jav
a:1150)
          at
org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1091)
          at
org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:961)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
          at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
          at java.lang.Class.forName0(Native Method)
          at java.lang.Class.forName(Class.java:219)
          at
org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:434)
          ... 11 more
  --- Nested Exception ---
  java.lang.ClassNotFoundException:
com.canoo.webtest.steps.verify.VerifyElementText
          at
org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.jav
a:1150)
          at
org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1091)
          at
org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:961)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
          at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
          at java.lang.Class.forName0(Native Method)
          at java.lang.Class.forName(Class.java:219)
          at
org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:434)
          at
org.apache.tools.ant.taskdefs.Definer.loadProperties(Definer.java:281)
          at org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:214)
          at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
          at org.apache.tools.ant.Task.perform(Task.java:364)
          at org.apache.tools.ant.Target.execute(Target.java:301)
          at
org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:135)
          at
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:89)
          at org.apache.tools.ant.Main.runBuild(Main.java:617)
          at org.apache.tools.ant.Main.startAnt(Main.java:183)
          at org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)
          at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)
  Total time: 3 seconds
  -------------------------------------------------------

  can any one pls help in this regard !!!
  Thanks in Advance !





------=_NextPart_000_0011_01C4636A.20C94100
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D795395812-06072004><FONT face=3DArial color=3D#0000ff =
size=3D2>try=20
with</FONT></SPAN></DIV>
<DIV><SPAN class=3D795395812-06072004>&lt;fileset dir=3D"e:/webtest/lib" =

includes=3D"*.jar"/&gt;</SPAN></DIV>
<DIV><SPAN class=3D795395812-06072004>cheers</SPAN></DIV>
<DIV><SPAN class=3D795395812-06072004>Mittie</SPAN></DIV>
<BLOCKQUOTE=20
style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px =
solid">
  <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
  size=3D2>-----Original Message-----<BR><B>From:</B>=20
  webtest-admin@lists.canoo.com =
[mailto:webtest-admin@lists.canoo.com]<B>On=20
  Behalf Of </B>sumathi P<BR><B>Sent:</B> Dienstag, 6. Juli 2004=20
  14:12<BR><B>To:</B> webtest-admin@gate2.canoo.com;=20
  webtest@lists.canoo.com<BR><B>Subject:</B> [Webtest] Problem with=20
  SimpleTest.xml<BR><BR></FONT></DIV>
  <P>&nbsp; Hi ,<BR>This is my SimpleTest.xml=20
  =
,<BR>-------------------------------------------------------<BR>&lt;proje=
ct=20
  name=3D"SimpleTest" basedir=3D"." default=3D"main"&gt;<BR><BR>&nbsp; =
&lt;taskdef=20
  file=3D"e:/webtest/webtestTaskdefs.properties"&gt;<BR>&nbsp; &nbsp; =
&nbsp;=20
  &lt;classpath&gt;<BR>&nbsp; &nbsp; &nbsp; &nbsp; &lt;fileset=20
  dir=3D"e:/webtest/lib" =
includes=3D"e:/webtest/lib/*.jar"/&gt;<BR>&nbsp; &nbsp;=20
  &nbsp;&nbsp; &lt;/classpath&gt;<BR>&nbsp; =
&lt;/taskdef&gt;<BR><BR>&nbsp;=20
  &lt;target name=3D"main"&gt;<BR>&nbsp; &nbsp; &nbsp; &lt;testSpec=20
  name=3D"myTest"&gt;<BR>&nbsp; &nbsp; &nbsp; &nbsp; &lt;config =
<BR>&nbsp; &nbsp;=20
  &nbsp; &nbsp; &nbsp; &nbsp; host=3D"localhost"<BR>&nbsp; &nbsp; &nbsp; =
&nbsp;=20
  &nbsp; &nbsp; port=3D"80"<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =

  protocol=3D"http"<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
basepath=3D"myApp"=20
  /&gt;<BR>&nbsp; &nbsp; &nbsp; &nbsp; &lt;steps&gt;<BR>&nbsp; &nbsp; =
&nbsp;=20
  &nbsp; &nbsp; &nbsp; &lt;invoke <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp;=20
  &nbsp; stepid=3D"get Login Page"<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp;=20
  &nbsp; url=3D"login" /&gt;<BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp;=20
  &lt;verifytitle <BR>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;=20
  stepid=3D"we should see the login title"<BR>&nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp;=20
  &nbsp; &nbsp; text=3D"Login Page" /&gt;<BR>&nbsp; &nbsp; &nbsp; &nbsp; =

  &lt;/steps&gt;<BR>&nbsp; &nbsp; &nbsp; &lt;/testSpec&gt;<BR>&nbsp;=20
  =
&lt;/target&gt;<BR>&lt;/project&gt;<BR>----------------------------------=
---------------------<BR>When=20
  i tried to build that file using ....<BR>ant -d -buildfile =
SimpleTest.xml=20
  ,<BR>I'm getting the following=20
  =
Exception...<BR>-------------------------------------------------------<B=
R>E:\webtest\samples&gt;ant=20
  -d -buildfile Test.xml<BR>Apache Ant version 1.6.1 compiled on =
February 12=20
  2004<BR>Buildfile: Test.xml<BR>Adding reference:=20
  ant.PropertyHelper<BR>Detected Java version: 1.4 in:=20
  D:\j2sdk1.4.2_03\jre<BR>Detected OS: Windows XP<BR>Adding reference:=20
  ant.ComponentHelper<BR>Setting ro project property: ant.version -&gt; =
Apache=20
  Ant version 1.6.1 compiled on February 12 2004<BR>Setting ro project =
property:=20
  ant.file -&gt; E:\webtest\samples\Test.xml<BR>Adding reference:=20
  ant.projectHelper<BR>Adding reference: ant.parsing.context<BR>Adding=20
  reference: ant.targets<BR>parsing buildfile =
E:\webtest\samples\Test.xml with=20
  URI =3D file:///E:/webtest/samples/Test.xml<BR>resolving systemId:=20
  file:///E:/webtest/samples/WebTest.dtd<BR>Setting ro project property: =

  ant.project.name -&gt; Test<BR>Adding reference: Test<BR>Setting ro =
project=20
  property: ant.file.Test -&gt; E:\webtest\samples\Test.xml<BR>Project =
base dir=20
  set to: E:\webtest\samples<BR>+Target:<BR>+Target: main<BR>Could not =
load a=20
  dependent class (com/sun/media/jai/codec/FileSeekableStream) for type=20
  image<BR>Could not load a dependent class (com/jcraft/jsch/UserInfo) =
for type=20
  sshexec<BR>Could not load a dependent class (com/jcraft/jsch/UserInfo) =
for=20
  type scp<BR>Could not load a dependent class=20
  (org/apache/commons/net/SocketClient) for type rexec<BR>Could not load =
class=20
  (org.apache.tools.ant.tasksdefs.cvslib.CvsVersion) for type=20
  cvsversion<BR>Could not load a dependent class =
(com/starbase/starteam/Item)=20
  for type stlist<BR>Could not load a dependent class=20
  (org/apache/commons/net/SocketClient) for type telnet<BR>Could not =
load a=20
  dependent class (org/apache/commons/net/ftp/FTP) for type ftp<BR>Could =
not=20
  load a dependent class (jdepend/xmlui/JDepend) for type =
jdepend<BR>Could not=20
  load a dependent class (junit/framework/TestListener) for type =
junit<BR>Could=20
  not load a dependent class (com/starbase/starteam/Item) for type=20
  stcheckin<BR>Could not load a dependent class =
(com/starbase/starteam/Item) for=20
  type stcheckout<BR>fileset: Setup scanner in dir E:\webtest\lib with=20
  patternSet{ includes: [e:/webtest/lib/*.jar] exc<BR>Finding class=20
  com.canoo.webtest.steps.verify.VerifyElementText<BR><BR>BUILD=20
  FAILED<BR>E:\webtest\samples\Test.xml:8: taskdef class=20
  com.canoo.webtest.steps.verify.VerifyElementText cann<BR>&nbsp; &nbsp; =
&nbsp;=20
  &nbsp; at=20
  =
org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:460)<BR>=
&nbsp;=20
  &nbsp; &nbsp; &nbsp; at=20
  =
org.apache.tools.ant.taskdefs.Definer.loadProperties(Definer.java:281)<BR=
>&nbsp;=20
  &nbsp; &nbsp; &nbsp; at=20
  =
org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:214)<BR>&nbsp;=
=20
  &nbsp; &nbsp; &nbsp; at=20
  =
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)<BR>&=
nbsp;=20
  &nbsp; &nbsp; &nbsp; at=20
  org.apache.tools.ant.Task.perform(Task.java:364)<BR>&nbsp; &nbsp; =
&nbsp;=20
  &nbsp; at =
org.apache.tools.ant.Target.execute(Target.java:301)<BR>&nbsp;=20
  &nbsp; &nbsp; &nbsp; at=20
  =
org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:135)=
<BR>&nbsp;=20
  &nbsp; &nbsp; &nbsp; at=20
  =
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:89=
)<BR>&nbsp;=20
  &nbsp; &nbsp; &nbsp; at=20
  org.apache.tools.ant.Main.runBuild(Main.java:617)<BR>&nbsp; &nbsp; =
&nbsp;=20
  &nbsp; at org.apache.tools.ant.Main.startAnt(Main.java:183)<BR>&nbsp; =
&nbsp;=20
  &nbsp; &nbsp; at=20
  org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)<BR>&nbsp; =
&nbsp;=20
  &nbsp; &nbsp; at=20
  org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)<BR>Caused =
by:=20
  java.lang.ClassNotFoundException:=20
  com.canoo.webtest.steps.verify.VerifyElementText<BR>&nbsp; &nbsp; =
&nbsp;=20
  &nbsp; at=20
  =
org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.=
java:1150)<BR>&nbsp;=20
  &nbsp; &nbsp; &nbsp; at=20
  =
org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1091)<B=
R>&nbsp;=20
  &nbsp; &nbsp; &nbsp; at=20
  =
org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:961)<BR=
>&nbsp;=20
  &nbsp; &nbsp; &nbsp; at=20
  java.lang.ClassLoader.loadClass(ClassLoader.java:235)<BR>&nbsp; &nbsp; =
&nbsp;=20
  &nbsp; at=20
  =
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)<BR>&nbsp; =
&nbsp;=20
  &nbsp; &nbsp; at java.lang.Class.forName0(Native Method)<BR>&nbsp; =
&nbsp;=20
  &nbsp; &nbsp; at java.lang.Class.forName(Class.java:219)<BR>&nbsp; =
&nbsp;=20
  &nbsp; &nbsp; at=20
  =
org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:434)<BR>=
&nbsp;=20
  &nbsp; &nbsp; &nbsp; ... 11 more<BR>--- Nested Exception=20
  ---<BR>java.lang.ClassNotFoundException:=20
  com.canoo.webtest.steps.verify.VerifyElementText<BR>&nbsp; &nbsp; =
&nbsp;=20
  &nbsp; at=20
  =
org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.=
java:1150)<BR>&nbsp;=20
  &nbsp; &nbsp; &nbsp; at=20
  =
org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1091)<B=
R>&nbsp;=20
  &nbsp; &nbsp; &nbsp; at=20
  =
org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:961)<BR=
>&nbsp;=20
  &nbsp; &nbsp; &nbsp; at=20
  java.lang.ClassLoader.loadClass(ClassLoader.java:235)<BR>&nbsp; &nbsp; =
&nbsp;=20
  &nbsp; at=20
  =
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)<BR>&nbsp; =
&nbsp;=20
  &nbsp; &nbsp; at java.lang.Class.forName0(Native Method)<BR>&nbsp; =
&nbsp;=20
  &nbsp; &nbsp; at java.lang.Class.forName(Class.java:219)<BR>&nbsp; =
&nbsp;=20
  &nbsp; &nbsp; at=20
  =
org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:434)<BR>=
&nbsp;=20
  &nbsp; &nbsp; &nbsp; at=20
  =
org.apache.tools.ant.taskdefs.Definer.loadProperties(Definer.java:281)<BR=
>&nbsp;=20
  &nbsp; &nbsp; &nbsp; at=20
  =
org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:214)<BR>&nbsp;=
=20
  &nbsp; &nbsp; &nbsp; at=20
  =
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)<BR>&=
nbsp;=20
  &nbsp; &nbsp; &nbsp; at=20
  org.apache.tools.ant.Task.perform(Task.java:364)<BR>&nbsp; &nbsp; =
&nbsp;=20
  &nbsp; at =
org.apache.tools.ant.Target.execute(Target.java:301)<BR>&nbsp;=20
  &nbsp; &nbsp; &nbsp; at=20
  =
org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:135)=
<BR>&nbsp;=20
  &nbsp; &nbsp; &nbsp; at=20
  =
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:89=
)<BR>&nbsp;=20
  &nbsp; &nbsp; &nbsp; at=20
  org.apache.tools.ant.Main.runBuild(Main.java:617)<BR>&nbsp; &nbsp; =
&nbsp;=20
  &nbsp; at org.apache.tools.ant.Main.startAnt(Main.java:183)<BR>&nbsp; =
&nbsp;=20
  &nbsp; &nbsp; at=20
  org.apache.tools.ant.launch.Launcher.run(Launcher.java:197)<BR>&nbsp; =
&nbsp;=20
  &nbsp; &nbsp; at=20
  org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)<BR>Total =
time: 3=20
  =
seconds<BR>-------------------------------------------------------<BR><BR=
>can=20
  any one pls help in this regard !!!<BR>Thanks in Advance ! =
</P><BR><BR><A=20
  href=3D"http://clients.rediff.com/signature/track_sig.asp" =
target=3D_blank><IMG=20
  hspace=3D0=20
  =
src=3D"http://ads.rediff.com/RealMedia/ads/adstream_nx.cgi/www.rediffmail=
.com/inbox.htm@Bottom"=20
  border=3D0 NOSEND=3D"1"></A> </BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_0011_01C4636A.20C94100--