+1. I have done some work in this area, and Latka goes further than
mine.
Does anyone have a problem with me adding xpath validations?
Scott Sanders
-----Original Message-----
From: Morgan Delagrange [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 17, 2001 1:49 PM
To: commons
Subject: [VOTE] REDUX - move Latka to Commons Proper - Proof of Concept
Hi all,
Well, unfortunately Latka only has two +1 votes so far. :(
As a proof of concept, I tried to convert the JSP portion of the
Watchdog
functional tests from the current ant file to a Latka suite. It's
checked
in as doc/WatchdogJSPSuite.xml in the latka directory
(http://cvs.apache.org/viewcvs/~checkout~/jakarta-commons-sandbox/latka/
doc/
WatchdogJSPSuite.xml?rev=1.1&content-type=text/xml). [Note: if you open
this file in IE, the browser will expand all the implied attributes,
making
the file look much more verbose than it is. If you open it in a text
editor, it'll look sloppy because I converted it with regular
expressions
:)] I had to add a golden file test to Latka, which I mostly cribbed
from
the gtest code. Otherwise it uses functionality that Latka already
possesses. If you want to try it out, here's how to do it:
1) Update Latka from the repository and build it
2) Deploy Watchdog 4.0's "jsp-tests" webapp
3) Put the Latka dependencies in your classpath
4) execute this:
java -Djava.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol
-Dwg
dir=<path to the "jsp-golden" dir> org.apache.commons.latka.Latka <path
to
"WatchdogJSPSuite.xml">
5) Hope I didn't forget anything. :)
Currently 169 of the 175 tests pass on Latka (with my configuration).
Most
of the failures are because Latka automatically submits HTTP 1.1
requests,
but some of the golden files look for HTTP 1.0. I plan to try the same
thing with the Watchdog Servlet tests, but I'll have to make some minor
enhancements to Latka first.
I'm not proposing that we replace Watchdog's Ant script with Latka at
this
time. However, I think that this example demonstrates the flexibility
of
Latka as a functional testing tool. Not only could it perform these
tests
with only minor enhancements to the code, Latka can test for other
things
that might not be available to Watchdog currently, such as making SSL
requests, performing regular expressions, and checking byte length. In
addition, Latka already supports drop-in custom validators, so projects
like
Watchdog could add their own logic without modifying the core Latka
logic.
And Latka already has other niceties, such as XML-based logging.
So, anyone interested in moving this to the Commons Proper? :)
- Morgan
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com