This is a multipart mime message
--Next_1189605819---0-202.137.237.207-27117
Content-type: text/plain;
charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
=0AHi Andrew,=0AThanks for your quick reply. Actually i have already test=
ed our application writing build.xml. But i want to run those scripts writi=
ng java code using ant and canoo webtest api. The code will take the webtes=
t script(only the test script excluding the ant tasks or ant properties) as=
input and run that using ant programmatically.=0A=0AIhave tried like below=
:=0A=0AProject p2 =3D new Project();=0A p2.setName("webtest_proj");=0A =
p2.setDefault("web_test_task") ;=0A p2.setBasedir(".");=0A =0A Config=
uration config =3D new Configuration();=0A config.setHaltonerror(false);=
=0A config.setHaltonfailure(false);=0A config.setHost("localhost");=0A =
config.setPort(8080);=0A config.setProtocol("http");=0A config.setRes=
ultfile("results.xml");=0A config.setResultpath(new File("D:\\subir\\Down=
loads\\webtest"));=0A config.setSaveresponse(true);=0A config.setSummar=
y(true);=0A =0A Ant ant =3D new Ant();=0A //ant.setProject(p2);=0A =
ant.setTaskName("test");=0A ant.setAntfile("D:\\subir\\Downloads\\webtest=
\\bkmmodulemod.xml");=0A WebtestTask webtask =3D new WebtestTask();=0A =
webtask.setProject(p2);=0A webtask.setName("web_test_task");=0A webtask=
.setTaskName("web_test_task");=0A webtask.addConfig(config);=0A webtask=
.addTask(ant);=0A =0A Target web_test_task =3D new Target();=0A web_t=
est_task.setName("web_test_task");=0A web_test_task.addTask(webtask);=0A =
=0A web_test_task.execute();=0A p2.addTarget(web_test_task);=0A=0A=0A=
Thanks=0A=0ASubir =0A=0AOn Tue, 11 Sep 2007 Andrew Sickorsky wrote :=0A>Hel=
lo, Subir!=0A>in our company we used the following:=0A>part of build.xml:=
=0A><target name=3D"test-web">=0A> <taskdef file=3D"${test-web.dir}/=
properties/webtest-tasks.properties">=0A> <classpath refid=3D"co=
mpile.test.classpath"/>=0A> </taskdef>=0A> <ant antfile=3D"${=
test-web.dir}/use-cases/web-tests.xml"/>=0A> </target>=0A>=0A>where web-=
test.xml is a common Canoo WebTest's file, and compile.test.classpath is AN=
T path structure with reference to directory with Webtest's library JARs (=
in our case they are:=0A>activation-1.1.jar=0A>classpath.xml=0A>commons-htt=
pclient-3.0.1.jar=0A>commons-io-1.3.1.jar=0A>dom4j-1.6.1.jar=0A>fontbox-0.1=
.0-dev-patched-20060622.jar=0A>groovy-all-1.0.jar=0A>htmlunit-1.13.jar=0A>j=
axen-1.1.1.jar=0A>js-1.6R5.jar=0A>mail-1.4.jar=0A>nekohtml-0.9.5.jar=0A>oro=
-2.0.6.jar=0A>pdfbox-0.7.3-dev-log4j-20060612.jar=0A>poi-3.0.1-FINAL.jar=0A=
>webtest.jar=0A>2webtest_T.jar)=0A>=0A>may be this helps.=0A>=0A>Cheers,=0A=
>Andrew=0A>>=0A>> Hi,=0A>>I'm using Canoo WebTest tool for automated testi=
ng of our application. I have already tested our application using this too=
l running the script from command line.=0A>>=0A>>Now, i want to run test wr=
iting java code using ant and canoo webtest api taking the test script file=
as input.=0A>>=0A>>Can anybody provide me sample code to start with for th=
at or any reference.=0A>>=0A>>Help me Please......=0A>>=0A>>Thanks && Regar=
ds...............=0A>>=0A>>Subir=0A>>=0A>>=0A>>=0A>>travel_rediff_signature=
_578x38.jpg <http://adworks.rediff.com/cgi-bin/AdWorks/click.cgi/www.rediff=
.com/signature-home.htm/1050715198@Middle5/1436607_1430041/1436150/1?PARTNE=
R=3D3&OAS_QUERY=3Dnull%20target=3Dnew%20> =0A>>=0A>=0A
--Next_1189605819---0-202.137.237.207-27117
Content-type: text/html;
charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
<P>=0A <BR>=0AHi Andrew,<BR>=0AThanks for your quick reply. Actually =
i have already tested our application writing build.xml. But i want to run =
those scripts writing java code using ant and canoo webtest api. The code w=
ill take the webtest script(only the test script excluding the ant tasks or=
ant properties) as input and run that using ant programmatically.<BR>=0A<B=
R>=0AIhave tried like below:<BR>=0A<BR>=0AProject p2 =3D new Project();<BR>=
=0A p2.setName(&=
quot;webtest_proj");<BR>=0A &nb=
sp; p2.setDefault("web_test_task") ;<BR>=0A &n=
bsp; p2.setBasedir(".&qu=
ot;);<BR>=0A <BR=
>=0A Configurati=
on config =3D new Configuration();<BR>=0A =
config.setHaltonerror(false);<BR>=0A =
config.setHaltonfailure(fals=
e);<BR>=0A confi=
g.setHost("localhost");<BR>=0A &=
nbsp; config.setPort(8080);<BR>=0A &n=
bsp; config.setProtocol("http");=
<BR>=0A config.s=
etResultfile("results.xml");<BR>=0A &nb=
sp; config.setResultpath(new File("D:\\subir=
\\Downloads\\webtest"));<BR>=0A  =
; config.setSaveresponse(true);<BR>=0A &nbs=
p; config.setSummary(true);<BR>=0A&n=
bsp; <BR>=0A &nb=
sp; Ant ant =3D new Ant();<BR=
>=0A //ant.setPr=
oject(p2);<BR>=0A &nbs=
p;ant.setTaskName("test");<BR>=0A  =
; ant.setAntfile("D:\\subir\\Downloads\\webt=
est\\bkmmodulemod.xml");<BR>=0A  =
; WebtestTask webtask =3D new WebtestTask();<BR>=0A =
; webtask.setProject(p=
2);<BR>=0A webta=
sk.setName("web_test_task");<BR>=0A &nb=
sp; webtask.setTaskName("web_test_task"=
);<BR>=0A webtas=
k.addConfig(config);<BR>=0A &=
nbsp; webtask.addTask(ant);<BR>=0A &=
nbsp; <BR>=0A &nb=
sp; Target web_test_task =3D new Target();<BR>=0A =
web_test_task.setName("=
web_test_task");<BR>=0A =
web_test_task.addTask(webtask);<BR>=0A &nbs=
p; <BR>=0A  =
; web_test_task.execute();<BR>=0A &n=
bsp; p2.addTarget(web_test_task);<BR=
>=0A<BR>=0A<BR>=0AThanks<BR>=0A<BR>=0ASubir <BR>=0A<BR>=0AOn Tue, 11 Sep 20=
07 Andrew Sickorsky wrote :<BR>=0A>Hello, Subir!<BR>=0A>in our compan=
y we used the following:<BR>=0A>part of build.xml:<BR>=0A><target =
name=3D"test-web"><BR>=0A> <t=
askdef file=3D"${test-web.dir}/properties/webtest-tasks.properties&quo=
t;><BR>=0A> <classpath re=
fid=3D"compile.test.classpath"/><BR>=0A>  =
; </taskdef><BR>=0A> <ant ant=
file=3D"${test-web.dir}/use-cases/web-tests.xml"/><BR>=0A>&=
nbsp; </target><BR>=0A><BR>=0A>where web-test.xml is a c=
ommon Canoo WebTest's file, and compile.test.classpath is ANT path structur=
e with reference to directory with Webtest's library JARs (in our cas=
e they are:<BR>=0A>activation-1.1.jar<BR>=0A>classpath.xml<BR>=0A>=
commons-httpclient-3.0.1.jar<BR>=0A>commons-io-1.3.1.jar<BR>=0A>dom4j=
-1.6.1.jar<BR>=0A>fontbox-0.1.0-dev-patched-20060622.jar<BR>=0A>groov=
y-all-1.0.jar<BR>=0A>htmlunit-1.13.jar<BR>=0A>jaxen-1.1.1.jar<BR>=0A&=
gt;js-1.6R5.jar<BR>=0A>mail-1.4.jar<BR>=0A>nekohtml-0.9.5.jar<BR>=0A&=
gt;oro-2.0.6.jar<BR>=0A>pdfbox-0.7.3-dev-log4j-20060612.jar<BR>=0A>po=
i-3.0.1-FINAL.jar<BR>=0A>webtest.jar<BR>=0A>2webtest_T.jar)<BR>=0A>=
;<BR>=0A>may be this helps.<BR>=0A><BR>=0A>Cheers,<BR>=0A>Andre=
w<BR>=0A>><BR>=0A>> Hi,<BR>=0A>>I'm using Canoo Web=
Test tool for automated testing of our application. I have already tested o=
ur application using this tool running the script from command line.<BR>=0A=
>><BR>=0A>>Now, i want to run test writing java code using ant =
and canoo webtest api taking the test script file as input.<BR>=0A>><=
BR>=0A>>Can anybody provide me sample code to start with for that or =
any reference.<BR>=0A>><BR>=0A>>Help me Please......<BR>=0A>=
><BR>=0A>>Thanks && Regards...............<BR>=0A>><=
BR>=0A>>Subir<BR>=0A>><BR>=0A>><BR>=0A>><BR>=0A>=
>travel_rediff_signature_578x38.jpg <http://adworks.rediff.com/cgi-bi=
n/AdWorks/click.cgi/www.rediff.com/signature-home.htm/1050715198@Middle5/14=
36607_1430041/1436150/1?PARTNER=3D3&OAS_QUERY=3Dnull%20target=3Dnew%20&=
gt; <BR>=0A>><BR>=0A><BR>=0A=0A</P>=0A<br><br>=0A<Table border=3D0=
Width=3D644 Height=3D57 cellspacing=3D0 cellpadding=3D0 style=3D'font-fami=
ly:Verdana;font-size:11px;line-height:15px;'><TR><td><a href=3D'http://adwo=
rks.rediff.com/cgi-bin/AdWorks/click.cgi/www.rediff.com/signature-home.htm/=
1050715198@Middle5/1436607_1430041/1436146/1?PARTNER=3D3&OAS_QUERY=3Dnull t=
arget=3Dnew '><img src =3Dhttp://imadworks.rediff.com/cgi-bin/AdWorks/adima=
ge.cgi/1436607_1430041/creative_1436146.jpg alt=3D'sbi_rediff_signaturelin=
e_578x38.jpg' border=3D0></a></td></TR></Table>
--Next_1189605819---0-202.137.237.207-27117--