For Programmers: Free Programming Magazines  


Home > Archive > Extreme Programming > May 2005 > Web UI test automation









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Web UI test automation
somenathdey

2005-04-27, 8:57 am

Hi,

I am required to automate test cases for testing a Web UI and is
currently trying to figure out which tool to use for this.

Do anyone of you know where can I get a comparison list of all the
tools that can be used for automating Web UI testing?

The tools that I am currently looking at are WebRunner and Maoi.

Since this is an urgent requirement, I would appreciate a quick
response from you.

Thanks,
Somenath

Phlip

2005-04-27, 3:58 pm

somenathdey wrote (rearranged):

> I am required to automate test cases for testing a Web UI and is
> currently trying to figure out which tool to use for this.


Your developers should have written tests for this web GUI as they wrote it.

> The tools that I am currently looking at are WebRunner and Maoi.


Shun capture playback. They are not "agile". You can't use them with
Test-Driven Development, meaning you can't change the test and force code to
upgrade. Such tools are hard to invoke after every 1~10 edits, and hard to
fix when innocent changes break their links to the tested GUI.

Don't reach thru a GUI to test internal logic.

> Do anyone of you know where can I get a comparison list of all the
> tools that can be used for automating Web UI testing?


A web site is a data pipeline, from a database to server-side code to an
HTML generator thru a web server and into a web browser.

Read this article:

http://www.objectmentor.com/resourc...leDialogBox.pdf

and push as many tests as possible below the HTML level.

Then, configure your HTML generator to emit pure XHTML. Some shops do this
by piping the data into XML, and transforming this with XSLT into XHTML. The
HTML markup codes nest in the XSLT and decorate the input XML. To get XHTML,
add to the XSLT this tag:

<xsl:output method="xml" media-type="text/html" standalone="no"
omit-xml-declaration="yes" encoding="UTF-8" />

Warning: Your WYSYWYG HTML editor might resist these techniques. Leave
behind any tools that interfere with light and rapid testing.

That XSLT rig sounds elaborate, but it's really efficient and practical.
Read the book /Extreme Programming for Web Projects/ to learn how it can
streamline your lifecycle. The book advises your earliest tests ensure your
site has no broken links. This rigor allows a site to grow smoothly and
cleanly.

Only test what you expect might break. The effort of putting the HTML into
XSLT will allow simple tests on the HTML layer, and XML validating parsers
(and maybe the HTML Tidy program) will automatically trap lots of bugs. To
TDD features into your XHTML output, parse this output with XML and query
into it with XPath. That allows queries like //table[@bgcolor='blue']. If
that query returns a node if a blue table exists anywhere in the page. HTML
refactors that move tags above the table will not break the test.

This project's source contains copious examples of XPath testing XHTML:

http://www.c2.com/cgi/wiki?MiniRubyWiki

After putting enough tests on the server-side, you still may need to test
the client-side behavior. If your web page submits elaborate forms, you can
simulate a web browser with a test rig called HttpUnit in Java, or WebUnit
for Ruby. Such tests can hit your server, pull pages, enter form data,
submit it, pull the response pages, and check these. Recall if your server
provides pure XHTML, then the client-side tests can also query it with
XPath.

Finally, you may need to test advanced CSS, DHTML, and JavaScript on the
client-side. To put tests here, use a system like Watir that grabs Internet
Explorer's Automation object model, and drives it to hit pages and evaluate
them.

I listed the tests in order of importance. If you don't need tests on a
given layer, feel free to fudge. For example, server-side tests could check
that the correct strings appear in the JavaScript. Evaluating that the
JavaScript arrives in a browser and performs becomes less important, so
maybe you can get away with not using client-side tests.

These solutions create a big bundle of tests, all using different languages,
libraries, and strategies. Make sure they all work together out of one
batch, and make sure that batch is fast enough developers will not hesitate
before running it. Also make sure errors bubble up from the batch and get
noticed.

--
Phlip
[url]http://www.c2.com/cgi/wiki?ZLand[/url]


alex_f_il@hotmail.com

2005-05-01, 9:01 pm

For Internet Explorer's Automation you can try SWExplorerAutomation
(http:\\home.comcast.net/~furmana/SWIEAutomation.htm). The tool allows
to record the automation scripts in VB.NET or C#.

info@e-valid.com

2005-05-02, 3:57 pm

somenathdey wrote:
> Hi,
>
> I am required to automate test cases for testing a Web UI and is
> currently trying to figure out which tool to use for this.
>
> ...snip...
>
> Since this is an urgent requirement, I would appreciate a quick
> response from you.
>
> Thanks,
> Somenath


The eValid system is specifically designed and optimized to test
all kinds of web browser enabled applications.

eValid is implemented as a complete browser, so it can achieve
very low overhead record/play functionality. And it can support
powerful server loading, complete site analysis, page timing and
tuning, and regression testing capabilities -- all in a self-
contained suite. It's ideal for XP.

You can download an evaluation copy of eValid from:

http://www.soft.com/eValid/Products...tml?status=FORM

Complete details about the eValid web analysis and testing suite
are found at:

http://www.e-Valid.com.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com