[Webtest] dataDriven problem
Tokutan
Tokutan <tokutan@gmail.com>
Thu, 10 Apr 2008 19:13:44 +1000
------=_Part_2586_26143289.1207818824394
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Hi,
First of all , I would like to say that Canoo Webtest is a really great tool
for automated testing tool. I am currently working in a company and all of
my colleagues are impressed by this tool.
I would like to say that data driven testing has been helping me a lot with
my work as a web tester. I have downloaded the latest version of CAnoo
webtest (Latest build: R_1693) and I am experiencing problem with data
driven from excel. It looks like when one of value in the row fails, any
subsequent rows would fail as well.
For example, I have created a very simple test as per follows:
<dataDriven tableContainer="Example1.xls" >
<webtest name="test">
<invoke url="${URL}"/>
<verifyXPath xpath="id('content')/h1" text="${Heading}"/>
</webtest>
</dataDriven>
My excel sheet looks like:
URL Heading
http://searchjobs.careerone.com.au/search/categories/Accounting.html Accounting
Jobss
http://searchjobs.careerone.com.au/search/categories/Administration_-_Secretarial.html
Administration
& Secretarial Jobs
I purposely type the wrong heading i.e. Accounting Jobss so that it will
fail during the testing. The second heading value (Administration &
Secretarial Jobs) is the correct value.
When I run the test, the first URL with the corresponding Heading value
(Accounting Jobss) would fail , however the second URL with its
corresponding Heading value (Administration & Secretarial Jobs) would also
fail.
The following is the result generated:
expected valueAccounting Jobss actual valueAdministration & Secretarial
Jobs
You can see that for some reason , the expected value is still the first
Heading Value whereby it should be the second Heading value i.e.
Administration & Secretarial Jobs
Please assist to solve this puzzle for me.
Thanks
------=_Part_2586_26143289.1207818824394
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
<br><br><div class="gmail_quote">Hi,<br><br>First of all , I would like to say that Canoo Webtest is a really great tool for automated testing tool. I am currently working in a company and all of my colleagues are impressed by this tool.<br>
<br>I would like to say that data driven testing has been helping me a lot with my work as a web tester. I have downloaded the latest version of CAnoo webtest (Latest build:
R_1693) and I am experiencing problem with data driven from excel. It looks like when one of value in the row fails, any subsequent rows would fail as well. <br><br>For example, I have created a very simple test as per follows:<br>
<br><dataDriven tableContainer="Example1.xls" ><br> <br> <webtest name="test"><br><br> <invoke url="${URL}"/><br> <br> <br> <verifyXPath xpath="id('content')/h1" text="${Heading}"/> <br>
<br></webtest><br></dataDriven><br><br>My excel sheet looks like:<br><br>
<table style="border-collapse: collapse; width: 613pt;" border="0" cellpadding="0" cellspacing="0" width="817"><col style="width: 429pt;" width="572">
<col style="width: 184pt;" width="245">
<tbody><tr style="height: 15pt;" height="20">
<td style="height: 15pt; width: 429pt;" height="20" width="572">URL</td>
<td style="width: 184pt;" width="245">Heading</td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20"><a href="http://searchjobs.careerone.com.au/search/categories/Accounting.html" target="_blank">http://searchjobs.careerone.com.au/search/categories/Accounting.html</a></td>
<td>Accounting Jobss</td>
</tr>
<tr style="height: 15pt;" height="20">
<td style="height: 15pt;" height="20"><a href="http://searchjobs.careerone.com.au/search/categories/Administration_-_Secretarial.html" target="_blank">http://searchjobs.careerone.com.au/search/categories/Administration_-_Secretarial.html</a></td>
<td>Administration & Secretarial Jobs</td>
</tr>
</tbody></table><br> <br>I purposely type the wrong heading i.e. Accounting Jobss so that it will fail during the testing. The second heading value (Administration & Secretarial Jobs) is the correct value.<br><br>
When I run the test, the first URL with the corresponding Heading value (Accounting Jobss) would fail , however the second URL with its corresponding Heading value (Administration & Secretarial Jobs) would also fail.<br>
<br>The following is the result generated:<br><br><table><tbody><tr><td>expected value</td><td>Accounting Jobss</td>
</tr>
<tr>
<td>actual value</td><td>Administration & Secretarial Jobs</td></tr></tbody></table><br>You can see that for some reason , the expected value is still the first Heading Value whereby it should be the second Heading value i.e. Administration & Secretarial Jobs<br>
<br>Please assist to solve this puzzle for me.<br><br>Thanks<br>
</div><br>
------=_Part_2586_26143289.1207818824394--