----- Original Message -----
From: "Ivelin Ivanov" <[EMAIL PROTECTED]>
To: "Jakarta Commons Developers List" <[EMAIL PROTECTED]>
Sent: Thursday, May 16, 2002 8:29 AM
Subject: Re: Latka & Anteater


> Jeff,
>
> Thank you for the extensive response.
>
> I am having hard time making a choice, but it appears that Anteater was
> built from scratch based on your experience with Latka and is therefore a
> more viable long term solution.

I don't know about that...  :)  I think the differences are greater than
they appear; it depends on what your needs are.  I'd try to enumerate which
product is better for what, but it's open to interpretation and personal
preference.

> Can latka be used for writing complete test case scenarios: e.g. login, go
> through a product purchase, logout?

I've written tests like that.  You can wrap tests in a "session" tag, which
retains cookies and referers between requests.  You can't tell Latka to fill
out forms or push buttons, but you can set request parameters and request
headers to simulate that kind of user activity.

> Do you plan to include an option for JUnit reporting in Anteater similar
to
> Latka's, so that tests can integrated with all other junit tests?

At some point, Latka will probably come with an Ant task.

> Regards,
>
> Ivelin
>
>
> ----- Original Message -----
> From: "Jeff Turner" <[EMAIL PROTECTED]>
> To: "Jakarta Commons Developers List" <[EMAIL PROTECTED]>
> Sent: Thursday, May 16, 2002 12:57 AM
> Subject: Re: Latka & Anteater
>
>
> > On Wed, May 15, 2002 at 10:26:47PM -0500, Ivelin Ivanov wrote:
> > >
> > > Can some of the Latka experts please comment on how Latka compares to
> > > Anteater (which emerged from Cocoon)?
> > >
> > > http://sourceforge.net/projects/aft/
> >
> > I've worked on both projects, and like both for different reasons.
> >
> > Latka pros:
> >  - Strong typing via a DTD.
> >  - Internally, it's got a very nice delegating-SAX-handler model for
> >    adding new elements.
> >  - Decent XML reporting.
> >  - After all Dion's work, it's docs are rather good.
> >
> > Latka cons:
> >  - A PITA to compile, due to it's many dependencies.  Hopefully that's
> >    changed with Maven.
> >  - The XML file is a bit hard to comprehend at first, due to the use of
> >    &entities;
> >  - Inflexible XML syntax (see below for definition of 'flexible':)
> >
> >
> > Anteater pros:
> >  - It's based on Ant (it's really a bunch of Ant tasks). This makes it
> >    wonderfully flexible:
> >    - I can parametrize tests, by defining variables like ${host},
> >      ${port}, ${debuglevel} as properties, and reuse them throughout the
> >      script.
> >    - Through the use of targets, I can group tests together, and with
> >      the 'depends' attribute, can have common groups of tests. Latka's
> >      approach (entities) is workable but not half as nice & intuitive.
> >    - I can <echo> whenever I want, or <fail> halfway through a test.
> >    - I can use Ant's <parallel> to test multiple servers at once.
> >    - I can capture the matched <regexp> or <xpath> value as a property,
> >      and print it out for debugging.
> >    - I can do conditional logic, eg "If response code is 200, do a
> >      <regexp> test, else if response code is 404, set the ${failed}
> >      variable, else <fail> the test".
> >
> >  - It supports testing of interactive services like SOAP, which need to
> >    hold a 'conversation' with another HTTP server. It does this by
> >    launching an embedded Tomcat instance, and then registering
> >    'listeners' which validate incoming requests and return specified
> >    responses. Apart from SOAP/web services testing, this allows one to
> >    'unit test' a website: have an Ant script launch the webapp, test it
> >    and shut it down again.
> >
> >    Here's how you'd launch a Tomcat, and then send a query to
> >    it. Both the request and response are validated with <match> tags:
> >
> >     <servletContainer port="8101"/>
> >
> >     <http description="Test the regexp matcher">
> >       <parallel>
> >         <listener path="/good.html">
> >           <match>
> >             <method value="GET"/>
> >             <sendResponse href="test/responses/good.html" />
> >           </match>
> >         </listener>
> >
> >         <sequential>
> >           <sleep seconds="1"/>
> >           <httpRequest path="/good.html">
> >             <match>
> >               <regexp mustMatch="false" assign="n">exception</regexp>
<!--
> mustn't contain the text 'exception' -->
> >               <regexp assign="m"><![CDATA[.*<html>.*<body.*<p.*You sent
> the proper request.*</p>.*</body>.*</html>]]></regexp>
> >             </match>
> >           </httpRequest>
> >         </sequential>
> >       </parallel>
> >     </http>
> >
> >
> > Anteater cons:
> >  - Being based on Ant, Anteater is 'loosely typed', ie scripts aren't
> >    checked against a DTD.
> >  - It's not 1.0-quality yet. Ie, the README file is misleading, and you
> >    must symlink build/anteater-0.9.x to build/anteater in order to run
> >    the tests. The docs in CVS are rapidly approaching Latka quality, but
> >    not on the website yet, so it's best to learn by example (see
> >    test.xml).
> >  - I don't think there is any XML reporting mechanism beyond Ant's
> >    standard ability to attach project listeners, which may not provide
> >    sufficient detail (I haven't tested).
> >
> >
> > Btw, there's no reason why Anteater and Latka couldn't share a common
> > API for 'validators'. I'd like to try this, but for now it's less effort
> > just to duplicate them (there's not that many).
> >
> >
> > HTH,
> >
> > --Jeff
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to