Hi Scott and others,
Funny you should mention that. :) We have this groovy tool we've been
developing called Latka, which is intended for HTTP functional testing; we
have also used it for simple system monitoring. It has an optional
XML format that is eerily similiar to what you describe:
<suite default_host="blah.com" default_port="80" label="Tabasco">
<request path="/"
label="Homepage">
<validate>
<status_code/>
<byte_length min="15000" max="25000"/>
<max_request_time millis="10000"/>
</validate>
</request>
<request path="/education"
label="Education Channel">
<validate>
<regexp pattern="</html>" ignoreCase="true"/>
</validate>
</request>
...
</suite>
Latka is a working application with tests for cookies, regular
expressions, response byte length, request time, and status
codes. The work Rod, Doug and I have been doing lately on
HttpClient has been in support of this app.
Also, coincidentally, Rod and I have been working on XMLUnit in order to
integrate XML testing into Latka, so it sounds like ours and Scott's goals
are completely convergent.
We were planning on contributing Latka once HttpClient and Latka were a
little more stable. However, if Scott is looking for an XML-based HTTP
testing framework, we would be perfectly willing to check Latka into the
sandbox now. What do you think?
- Morgan
On Tue, 22 May 2001, Scott Sanders wrote:
> >> My intention is to allow the definition of test cases in XML, using
> >> digester to create the test cases, then execute and output
> >> the result to
> >> XML, styling to HTML with XSLT.
> >>
> >
> >
> > eh? Can you say that again slowly.
> >
> You define a test case in xml:
> <suite>
> <case id="001">
> <user-agent-header value="Some user agent"/>
> <input href="http://blah.blah.org/foo.bar"/>
> <output href="foo.bar.out"/>
> <golden-file href="foo.bar.golden"/>
> <tests>
> <assert-xpath expr="count(//img)=0"/>
> ...
> </tests>
> </case>
> ...
> </suite>
>
> Then push that through Digester to create JUnit Test Cases that will use
> HTTPUnit to get the output from the input, and then use XMLUnit to
> verify either the whole file against the golden file, or just xpath
> expressions. Then we log the result to XML using ant and JUnit, then
> format the results to HTML for the dev group to see.
>
> How was that?
>
> Scott Sanders
>
>
>
>