[Webtest] looping though suite of tests

Tim Pezarro Tim Pezarro" <Tim_Pezarro@pmc-sierra.com
Tue, 21 Jun 2011 16:13:40 -0700


This is a multi-part message in MIME format.

------_=_NextPart_001_01CC3068.DBB5F410
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Jason,

We use the dataDriven all the time in webtest scripts without problem.

Is it possible there is a typo in the header row of your excel =
spreadsheet? This header row has the name of the properties that are to =
be replaced in your script.

Here is a working example from  our suite:

<?xml version=3D"1.0"?>
<!DOCTYPE project SYSTEM "../../dtd/Project.dtd">
<project default=3D"keywords">
  <target name=3D"keywords">
    <dataDriven tableContainer=3D"properties/adaptec/keywords.xls">
      <webtest name=3D"keyword regression test on ${domain}${page}"  >
        <config
          autorefresh=3D"true"
          haltonerror =3D "false"
          haltonfailure =3D "false"
          easyajax=3D"true"
          useInsecureSSL=3D"true"
		  browser=3D"FF3">
          <option name=3D"ThrowExceptionOnFailingStatusCode" =
value=3D"false"/>
          <option name=3D"ThrowExceptionOnScriptError" value=3D"false" =
/>
        </config>
        <steps>
          <invoke
            url=3D"${domain}${page}"=20
            description=3D"Find keyword on ${domain}${page}" />
       	  <verifyText text=3D"${keyword.1}" />
          <verifyText text=3D"${keyword.2}" />
          <verifyText text=3D"${header}" />
          <verifyText text=3D"${footer}" />
          <not>
            <verifyText text=3D"an error occurred while processing this =
directive" />=20
          </not>  =20
          <verifyImages />
        </steps>
      </webtest>
    </dataDriven>
  </target>
</project>

Attached is a sample of a working excel spreadsheet for this test.

Cheers,

Tim Pezarro
Manager, Web Services
Corporate Marketing
tim_pezarro@pmc-sierra.com
Phone: +1-604-415-6044
Cell: +1-604-762-1000
Fax: +1-604-415-6602
PMC-Sierra, Inc.
8555 Baxter Place
Burnaby, BC, Canada
V5A 4V7



-----Original Message-----
From: webtest-admin@lists.canoo.com on behalf of Jason Little
Sent: Tue 6/21/2011 2:54 PM
To: webtest@lists.canoo.com
Subject: [Webtest] looping though suite of tests
=20
Hi,

We're looking at Webtest to create some smoketests for our app.  I am
using DataDriven to grab a list of client sites to test and then
running multiple tests in that loop but I can't seem to get properties
working.

Alltests.xml file:
------------------------


<?xml version=3D"1.0"?>

<project default=3D"test">
	<target name=3D"test" description=3D"runs all the tests">
		<dataDriven tableContainer=3D"WebtestConfig.xls">
							=09
					<ant antfile=3D"test_UserCanLogin.xml"/>
		=09
		</dataDriven>
=09
	</target>
</project>


test_UserCanLogin.xml file:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
<?xml version=3D"1.0"?>

<!DOCTYPE project SYSTEM "../dtd/Project.dtd">

<project default=3D"test">

	<target name=3D"test">
	<webtest name=3D"check ${ClientName} Login works">
	=09
=09
<invoke url=3D"http://${SITEIP}/login.aspx" description=3D"Go to
${ClientName} Login Page"/>
<setInputField xpath=3D"//input[contains(@id,'txtUserName')]" =
value=3D"XXXXXXXX" />
<setInputField name=3D"txtPassword" value=3D"XXXXXX" />
<clickButton htmlId=3D"btnSubmit" />
<verifyText text=3D"Dashboard"/>
	=09
	</webtest>
	</target>
	</project>


When the running test output is echo'd in the java console I see the
property from the xls config file is generated "check MyClient Login
works".  The actual test steps themselves show ${ClientName} instead
of "MyClient".

I'm not sure why the value from the xls file shows in <webtest> but
not the test steps.

I'm new to WebTest, any ideas or should I look at Groovy to do
something like this?  (I'm not a programmer by the way...)  Basically
our goal is to smoketest the same functionality for multiple client
sites as post-deployment validation.
_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest





------_=_NextPart_001_01CC3068.DBB5F410
Content-Type: application/ms-excel;
	name="keywords.xls"
Content-Transfer-Encoding: base64
Content-Description: keywords.xls
Content-Disposition: attachment;
	filename="keywords.xls"

0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAOwADAP7/CQAGAAAAAAAAAAAAAAABAAAACgAAAAAAAAAA
EAAAAgAAAAEAAAD+////AAAAAAAAAAD/////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////9
//////////7///8EAAAABQAAAAYAAAAHAAAACAAAAAkAAAD+////CwAAAP7/////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////1IA
bwBvAHQAIABFAG4AdAByAHkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAWAAUA////////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
/v///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////////////8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAD+////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///////////////wAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP7///8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////
////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/v///wAAAAAAAAAAAQAA
AAIAAAADAAAABAAAAAUAAAAGAAAABwAAAAgAAAAJAAAACgAAAAsAAAAMAAAADQAAAA4AAAAPAAAA
EAAAABEAAAASAAAAEwAAABQAAAAVAAAAFgAAABcAAAAYAAAAGQAAABoAAAAbAAAAHAAAAB0AAAAe
AAAAHwAAACAAAAAhAAAAIgAAACMAAAAkAAAAJQAAACYAAAAnAAAAKAAAAP7///8qAAAA/v////7/
//8tAAAALgAAAC8AAAD+////MQAAAP7/////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////8JCBAA
AAYFALsNzAcAAAAABgAAAOEAAgCwBMEAAgAAAOIAAABcAHAABAAAQ2FsYyAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEIAAgCwBGEBAgAAAMABAAA9AQIAAQCc
AAIADgCvAQIAAAC8AQIAAAA9ABIAAAAAAABAACA4AAAAAAABAA4AQAACAAAAjQACAAAAIgACAAAA
DgACAAEAtwECAAAA2gACAAAAMQAaAMgAAAD/f5ABAAAAAgAABQFBAHIAaQBhAGwAMQAaAMgAAAD/
f5ABAAAAAAAABQFBAHIAaQBhAGwAMQAaAMgAAAD/f5ABAAAAAAAABQFBAHIAaQBhAGwAMQAaAMgA
AAD/f5ABAAAAAAAABQFBAHIAaQBhAGwAHgQMAKQABwAAR0VORVJBTOAAFAAAAKQA9f8gAAAAAAAA
AAAAAADAIOAAFAABAAAA9f8gAAD0AAAAAAAAAADAIOAAFAABAAAA9f8gAAD0AAAAAAAAAADAIOAA
FAACAAAA9f8gAAD0AAAAAAAAAADAIOAAFAACAAAA9f8gAAD0AAAAAAAAAADAIOAAFAAAAAAA9f8g
AAD0AAAAAAAAAADAIOAAFAAAAAAA9f8gAAD0AAAAAAAAAADAIOAAFAA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