[Webtest] Data driven Test
Youli Yang
webtest@lists.canoo.com
Wed, 9 Jun 2004 18:30:26 -0700
This is a multi-part message in MIME format.
------_=_NextPart_001_01C44E8A.820E783A
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hi, Jeannie,
I create a file YY.property with only two lines in it:
"code0=3Dabc
code1=3Dabd"
=20
I try to loop into this file using your below scenario:
=20
=20
<repeat count=3D"2">
<invoke .... />
<setinputfield
stepid=3D"set airport code"
name=3D"airport"
value=3D"${code#{count}}" />
=20
=20
ant complains: Property ${code#{count} has not been set
=20
If I use value=3D"${code0}" />, it works. But I want to use count to
repeat the test many times.
=20
Please let me know what I did wrong.
Thank you very much.
=20
Youli
=20
=20
-----Original Message-----
From: webtest-admin@lists.canoo.com
[mailto:webtest-admin@lists.canoo.com] On Behalf Of Jeannie Graham
Sent: Tuesday, June 08, 2004 10:18 AM
To: 'webtest@lists.canoo.com'
Subject: RE: [Webtest] Data driven Test
=20
Hello there,=20
=20
Basically you just make a properties file (see smoketest.prop) and then
you set that up in your script (see first snippet below). Then you can
call a property by name "policy.number.auto" (see below) in the script
for it's value:
=20
<property file=3D"C:\canootests\smoketest_data.props}"/>
=20
<setinputfield
stepid=3D"Enter Policy number"
name=3D"policyNumber"
value=3D"${policy.number.auto}"/>
=20
-----Original Message-----
From: Devang Joshi [mailto:devang.joshi@patni.com]
Sent: Sunday, June 06, 2004 9:27 PM
To: webtest@gate2.canoo.com
Subject: [Webtest] Data driven Test
Hi,
I would like to know that How data driven test is possible
using Canoo WebTest tool.=20
If possible then explain it with some proper example.
=20
Thanks,
Devang
=20
------_=_NextPart_001_01C44E8A.820E783A
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DProgId content=3DWord.Document>
<meta name=3DGenerator content=3D"Microsoft Word 10">
<meta name=3DOriginator content=3D"Microsoft Word 10">
<link rel=3DFile-List href=3D"cid:filelist.xml@01C44E4F.D5AB4210">
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:DoNotRelyOnCSS/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:DocumentKind>DocumentEmail</w:DocumentKind>
<w:EnvelopeVis/>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;
mso-font-charset:0;
mso-generic-font-family:swiss;
mso-font-pitch:variable;
mso-font-signature:1627421319 -2147483648 8 0 66047 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0in;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;
text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;
text-underline:single;}
p
{mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
span.EmailStyle18
{mso-style-type:personal-reply;
mso-style-noshow:yes;
mso-ansi-font-size:10.0pt;
mso-bidi-font-size:10.0pt;
font-family:Arial;
mso-ascii-font-family:Arial;
mso-hansi-font-family:Arial;
mso-bidi-font-family:Arial;
color:navy;}
span.SpellE
{mso-style-name:"";
mso-spl-e:yes;}
span.GramE
{mso-style-name:"";
mso-gram-e:yes;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;
mso-header-margin:.5in;
mso-footer-margin:.5in;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */=20
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";}
</style>
<![endif]-->
</head>
<body lang=3DEN-US link=3Dblue vlink=3Dpurple =
style=3D'tab-interval:.5in'>
<div class=3DSection1>
<p class=3DMsoNormal><DEFANGED_DIV><DEFANGED_SPAN =
class=3D296371017-08062004><font
size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:10.0pt;font-family:Arial;
color:navy'>Hi, Jeannie,<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><span
style=3D'mso-spacerun:yes'> </span>I =
create a
file <span class=3DSpellE>YY.property</span> with only two lines in =
it:<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>“code0=3D<span =
class=3DSpellE><span
class=3DGramE>abc</span></span><o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><span
style=3D'mso-spacerun:yes'> </span>code1=3D<span =
class=3DSpellE>abd</span>”<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><span
style=3D'mso-spacerun:yes'> </span>I try to loop =
into
this file using your below scenario:<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><span
style=3D'mso-spacerun:yes'> =
</span><repeat
count=3D”2”><o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><span
style=3D'mso-spacerun:yes'> &nbs=
p;
</span><invoke ….<span
style=3D'mso-spacerun:yes'> &nbs=
p;
</span>/><o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><span
style=3D'mso-spacerun:yes'> &nbs=
p;
</span><<span =
class=3DSpellE>setinputfield</span><o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><span
style=3D'mso-spacerun:yes'> &nbs=
p;  =
;
</span><span class=3DSpellE>stepid</span>=3D”set airport =
code”<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><span
style=3D'mso-spacerun:yes'> &nbs=
p;  =
;
</span>name=3D”airport”<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><span
style=3D'mso-spacerun:yes'> &nbs=
p;  =
;
</span>value=3D”${code<span class=3DGramE>#{</span>count}}” =
/><o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><span
style=3D'mso-spacerun:yes'> </span>ant complains: =
Property
${code#{count} has not been set<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><span
style=3D'mso-spacerun:yes'> </span>If I use =
value=3D”${code0}”
/>, it works. But I want to use count to repeat the test many =
times.<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><span
style=3D'mso-spacerun:yes'> </span>Please let me know =
what I
did wrong.<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><span
style=3D'mso-spacerun:yes'> </span>Thank you very =
much.<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Youli<o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><span
style=3D'mso-spacerun:yes'> &nbs=
p;
</span><o:p></o:p></span></font></p>
<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D2 =
face=3DTahoma><span
style=3D'font-size:10.0pt;font-family:Tahoma'>-----Original =
Message-----<br>
<b><span style=3D'font-weight:bold'>From:</span></b> =
webtest-admin@lists.canoo.com
[mailto:webtest-admin@lists.canoo.com] <b><span =
style=3D'font-weight:bold'>On
Behalf Of </span></b>Jeannie Graham<br>
<b><span style=3D'font-weight:bold'>Sent:</span></b> Tuesday, June 08, =
2004 10:18
AM<br>
<b><span style=3D'font-weight:bold'>To:</span></b> =
'webtest@lists.canoo.com'<br>
<b><span style=3D'font-weight:bold'>Subject:</span></b> RE: [Webtest] =
Data driven
Test</span></font></p>
<p class=3DMsoNormal style=3D'margin-left:.5in'><font size=3D3 =
face=3D"Times New Roman"><span
style=3D'font-size:12.0pt'><o:p> </o:p></span></font></p>
<p style=3D'margin-left:.5in'><font size=3D2 color=3Dblue =
face=3DArial><span
style=3D'font-size:10.0pt;font-family:Arial;color:blue'>Hello there, =
</span></font></DEFANGED_SPAN><o:p></o:p></p>
<p style=3D'margin-left:.5in'><DEFANGED_DIV><DEFANGED_SPAN =
class=3D296371017-08062004><font
size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt'><DEFANGED_DIV></DEFANGED_SPAN> <o:p></o:p=
></span></font></p>
<p style=3D'margin-left:.5in'><DEFANGED_DIV><DEFANGED_SPAN =
class=3D296371017-08062004><font
size=3D2 color=3Dblue face=3DArial><span =
style=3D'font-size:10.0pt;font-family:Arial;
color:blue'><DEFANGED_DIV>Basically you just make a properties file (see
smoketest.prop) and then you set that up in your script (see first =
snippet
below). Then you can call a property by name
"policy.number.auto" (see below) in the script for it's =
value:</span></font></DEFANGED_SPAN><o:p></o:p></p>
<p style=3D'margin-left:.5in'><DEFANGED_DIV><DEFANGED_SPAN =
class=3D296371017-08062004><font
size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt'><DEFANGED_DIV></DEFANGED_SPAN> <o:p></o:p=
></span></font></p>
<p style=3D'margin-left:.5in'><DEFANGED_DIV><DEFANGED_SPAN =
class=3D296371017-08062004><font
size=3D2 color=3Dblue face=3DArial><span =
style=3D'font-size:10.0pt;font-family:Arial;
color:blue'><DEFANGED_DIV><property
file=3D"C:\canootests\smoketest_data.props}"/></span></font>=
</DEFANGED_SPAN><o:p></o:p></p>
<p style=3D'margin-left:.5in'><DEFANGED_DIV><DEFANGED_SPAN =
class=3D296371017-08062004><font
size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt'><DEFANGED_DIV></DEFANGED_SPAN> <o:p></o:p=
></span></font></p>
<p style=3D'margin-left:.5in'><DEFANGED_DIV><DEFANGED_SPAN =
class=3D296371017-08062004><font
size=3D2 color=3Dblue face=3DArial><span =
style=3D'font-size:10.0pt;font-family:Arial;
color:blue'><DEFANGED_DIV><setinputfield<br>
stepid=3D"Enter Policy number"<br>
name=3D"policyNumber"<br>
value=3D"${policy.number.auto}"/></span></font><=
/DEFANGED_SPAN><o:p></o:p></p>
<p style=3D'margin-left:.5in'><DEFANGED_DIV><DEFANGED_SPAN =
class=3D296371017-08062004><font
size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt'><DEFANGED_DIV></DEFANGED_SPAN> <o:p></o:p=
></span></font></p>
<blockquote =
style=3D'margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt'>
<p =
style=3D'mso-margin-top-alt:5.0pt;margin-right:0in;margin-bottom:12.0pt;
margin-left:.5in'><DEFANGED_DIV class=3DOutlookMessageHeader dir=3Dltr =
align=3Dleft><font
size=3D2 face=3DTahoma><span =
style=3D'font-size:10.0pt;font-family:Tahoma'><DEFANGED_DIV>-----Original=
Message-----<br>
<b><span style=3D'font-weight:bold'>From:</span></b> Devang Joshi
[mailto:devang.joshi@patni.com]<br>
<b><span style=3D'font-weight:bold'>Sent:</span></b> Sunday, June 06, =
2004 9:27
PM<br>
<b><span style=3D'font-weight:bold'>To:</span></b> =
webtest@gate2.canoo.com<br>
<b><span style=3D'font-weight:bold'>Subject:</span></b> [Webtest] Data =
driven
Test</span></font><o:p></o:p></p>
<p style=3D'margin-left:.5in'><DEFANGED_DIV><DEFANGED_SPAN =
class=3D727502404-07062004><font
size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;font-family:Arial'><DEFANGED_DIV>Hi,</span></fo=
nt></DEFANGED_SPAN><o:p></o:p></p>
<DEFANGED_DIV>
<p style=3D'margin-left:.5in'><DEFANGED_DIV><DEFANGED_SPAN =
class=3D727502404-07062004><font
size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;font-family:Arial'>
I would like to know that How data driven test is possible using Canoo =
WebTest
tool. </span></font></DEFANGED_SPAN><o:p></o:p></p>
<DEFANGED_DIV>
<p style=3D'margin-left:.5in'><DEFANGED_DIV><DEFANGED_SPAN =
class=3D727502404-07062004><font
size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;font-family:Arial'>If possible
then explain it with some proper =
example.</span></font></DEFANGED_SPAN><o:p></o:p></p>
<DEFANGED_DIV>
<p style=3D'margin-left:.5in'><DEFANGED_DIV><DEFANGED_SPAN =
class=3D727502404-07062004><font
size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:12.0pt'></DEFANGED_SPAN> <o:p></o:p></span></font=
></p>
<DEFANGED_DIV>
<p style=3D'margin-left:.5in'><DEFANGED_DIV><DEFANGED_SPAN =
class=3D727502404-07062004><font
size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;font-family:Arial'>Thanks,</span></font></DEFAN=
GED_SPAN><o:p></o:p></p>
<DEFANGED_DIV>
<p style=3D'margin-left:.5in'><DEFANGED_DIV><DEFANGED_SPAN =
class=3D727502404-07062004><font
size=3D2 face=3DArial><span =
style=3D'font-size:10.0pt;font-family:Arial'>Devang</span></font></DEFANG=
ED_SPAN><o:p></o:p></p>
<DEFANGED_DIV>
<p style=3D'margin-left:.5in'><DEFANGED_DIV><font size=3D3 face=3D"Times =
New Roman"><span
style=3D'font-size:12.0pt'> <o:p></o:p></span></font></p>
</blockquote>
</div>
<DEFANGED_DIV>
</body>
</html>
=00
------_=_NextPart_001_01C44E8A.820E783A--