[Webtest] subroutines

Aatish Arora webtest@lists.canoo.com
Wed, 27 Aug 2003 00:29:57 -0700 (PDT)


Interesting!

Am not doin anything similar but just manipulating
with the <ant> tag.

My test cases can be generalised. For eg:

To test a form, a test case goes somethign like this:

1) Navigate to a page
2) Fill in some data
3) check for result title and message-text (could be
success or error)

All this can be passed thru the ant tag ;)

A specific example:

For a login page - i might have test cases for 

1) valid loginname + valid password
2) invalid loginname + invalid password
3) valid loginname + valid password

i make use of the ant tag here to pass properties
(hence making it data driven) from outside (i.e
another script) and make a generalised module which i
call thru the ant tag

cheers!
Aatish


--- Bill Milbratz <Bmilbratz@participate.com> wrote:
> along similar lines, I've been experimenting w/
> using xsl and data xml to
> populate a web based system w/ testing data. (e.g.
> from a list of members
> use the 'register new members' interface to populate
> the system w/ 20
> members)
> 
> I've had one issue so far getting xsl to generate
> the ant properties..i.e.
> xsl needed escaped braces..i.e.
> 
> example (from xsl file):
>   <setinputfield stepid="set password" 
>      name="password"
>      value="${{login.ok.password}}" />
> 
> I worked around it w/a separate ant target to copy
> all copy/replace all my
> modules and includes  and escape the braces..
> 
> Is anyone else doing something like this?
> 
> any recommendations?
> 
> thanks,
> 
> bill
> 
> 
> 
> -----Original Message-----
> From: Aatish Arora [mailto:a_aatish@yahoo.com]
> Sent: Tuesday, August 26, 2003 12:49 AM
> To: webtest@lists.canoo.com
> Subject: Re: [Webtest] subroutines
> 
> 
> Hi!
> 
> Check out the <ant> tag ;).
> Theres an example called AllLanguagesTestSuite.xml
> on
>
http://webtest.canoo.com/webtest/manual/samples.html#5
> 
> Although in this case a test suite is mentioned - u
> can also try it out for a test case. The idea is to
> pass properties from outside - just like you would
> do
> in a subroutine. ;)
> 
> cheers!
> Aatish
> 
> --- "Thakkar, Hetal" <hetal.thakkar@citigroup.com>
> wrote:
> > Hi,
> > 
> > If I have several tests that are very similar, but
> > differ just a little
> > bit, then is there a way to extract the common
> > things into a subroutine?
> > 
> > For example, If I have two testcases, the
> testcases
> > are navigating upto
> > a page and verifying a table on thege. On one page
> > the table's data
> > starts at first column, while on the other data
> > starts at line 2. The
> > data is exactly the same, but the lines are
> > displaced by 1 lets say. Is
> > there a way to extract the table verification as a
> > subroutine and pass
> > it a parameter that specifies which line the table
> > starts from or
> > something similar to that?
> > 
> > Thanks,
> > Hetal
> > _______________________________________________
> > WebTest mailing list
> > WebTest@lists.canoo.com
> > http://lists.canoo.com/mailman/listinfo/webtest
> 
> 
> =====
> ========================
> THE FOUR STAGES OF LIFE:
> 
> 1) You believe in Santa Claus.
> 2) You don't believe in Santa Claus.
> 3) You are Santa Claus.
> 4) You look like Santa Claus.
> ========================
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> http://sitebuilder.yahoo.com
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
> 


=====
========================
THE FOUR STAGES OF LIFE:

1) You believe in Santa Claus.
2) You don't believe in Santa Claus.
3) You are Santa Claus.
4) You look like Santa Claus.
========================

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com