cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ovidiu Predescu <ovi...@cup.hp.com>
Subject Re: AntEater: a functional testing framework for HTTP/SOAP apps
Date Fri, 05 Oct 2001 16:58:44 GMT
On Fri, 05 Oct 2001 12:31:44 +0200, Stefano Mazzocchi <stefano@apache.org> wrote:

> > I called this tool AntEater (pun intended), as it's heavily based on Ant.
> 
> I think there is already a proposal called AntEater for Ant 2.0, you
> might want to check in the Ant CVS under the 'proposal' folder.

Thanks for the pointer, I'll check this one.

> > Anteater allows one to write tests that fire HTTP requests to a
> > Cocoon installation and test the incoming response, using simple
> > matching operations.  If Anteater and Cocoon are on the same
> > machine, you can use normal Ant tasks to modify Cocoon files while
> > the system is running, send another request to the server and test
> > in the response the modified Cocoon behavior.
> 
> Hmmm, can you write me an example of why you think something like this
> is helpful? i mean, how would the tester suite know what to modify?

One example would be testing whether after modifying an XSP page,
Cocoon recompiles, reloads and executes the new stuff. This could be
done by using the Ant <copy> and <filterset> tasks to copy a template
file and replace in it a @token@. Something like this:

<target name="test-xsp-reloading">
  <http>
    <httpRequest href="http://localhost/cocoon/xsp/simple">
      <match>
        <xref select="/html/title" value="1"/>
      </match>
    </httpRequest>
  </http>

  <!-- now modify the xsp -->
  <copy file="templates/xsp/simple.xsp"
        toFile="build/cocoon/webapps/docs/samples/xsp/simple.xsp">
    <filterset>
      <filter token="TITLE" value="2"/>
    </filterset>
  </copy>

  <!-- check the new result -->
  <http>
    <httpRequest href="http://localhost/cocoon/xsp/simple">
      <match>
        <xref select="/html/title" value="2"/>
      </match>
    </httpRequest>
  </http>
</target>

I think you get the idea.

> hey, if it fixed cocoon bugs by itself, we can let it run for a
> couple of days and make the final release :)
> 
> Just kidding, of course.

That would be nice indeed 8-)>

> > I was wondering what would be a good way to release it. As it is
> > right now it's a standalone package, much like Ant. You install it
> > on the local filesystem, and you get an 'anteater' script, that
> > behaves just like the 'ant' script from ant, while adding
> > additional tasks. The reason for a separation from Cocoon is that
> > it's quite generic, not tied to Cocoon in any way. In fact one of
> > the team in my group plans to use it to test generic XML based
> > applications, involving synchronous and asynchronous SOAP
> > messages.
> > 
> > I append the current documentation I wrote for it. I would
> > appreciate any comments from you on Anteater.
> 
> Question: how hard would it be to integrate it with Ant? I mean,
> creating an optional, but coherent, set of tasks that extend the
> basic ant functionality into this web-testing suite?

Maybe I wasn't clear in my message. Anteater is already based on Ant,
all the elements described above are Ant tasks. It's just that it
installs as a standalone package.

The reason it does this is because it incorporates Tomcat in it. The
<listener> functionality described in the documentation is implemented
using an embedded Tomcat. In fact the <servletContainer> element is
the one that starts Tomcat.

> I know there is very little functional overlap between the two, but
> this can be said for almost any Ant task: Ant power comes from
> exactly from the availability of so many useful tasks and adding new
> ones is a really good thing to do.

> But the SOAP incoming requests things might be a little oftopic for
> Ant... hmmm, let's see what you guys thing first and then we can ask
> around where the best location is.
> 
> Anyway, if it doesn't end up under Ant, please change that name
> since it might appear a little rude on them.

I'm not sure it's a good idea to package Anteater under Ant, it's a
complex enough framework myself and most probably Ant people, won't
like to see embedded in Ant.

Anteater is a marsupial that eats ants, and since the framework is
built on top on Ant, everything is essentially an Ant task. It's just
like an anteater, it eats ants (in our case tasks) at every invocation
you make ;-). Let me be clear, Anteater is not a replacement of Ant,
is a neat extension of it to solve problems Ant was never intended
for.

Regards,
-- 
Ovidiu Predescu <ovidiu@cup.hp.com>
http://orion.rgv.hp.com/ (inside HP's firewall only)
http://sourceforge.net/users/ovidiu/ (my SourceForge page)
http://www.geocities.com/SiliconValley/Monitor/7464/ (GNU, Emacs, other stuff)

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message