You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Ivelin Ivanov <iv...@apache.org> on 2002/06/07 12:44:19 UTC

Re: Anteater session support (Re: Anteater tests)

Another question.

Does anteater support alternative scenarios for test cases.
Something based on the cocoon flow continuations concept.

For example can I write a login step and then continue with two independent
alternative paths. First one will go through one set of pages then the
second. At the end they will both logout. I would be interested in reusing
the login and logout steps, but these two test cases should run
independently of each other.
I would expect Anteater to first login, go through the first path, logout,
then login again, go through the second path, logout.


I think Anteater discussions should be on Cocoon's list, since automated
functional testing is a very key subject and Cocoon doesn't have a better
solution at the moment. Commercial web app testing tools cost tens,
sometimes hundreds of thousands.


Thanks for the help.

Ivelin


----- Original Message -----
From: "Jeff Turner" <je...@socialchange.net.au>
To: "Ivelin Ivanov" <iv...@apache.org>
Cc: <af...@lists.sourceforge.net>
Sent: Sunday, May 26, 2002 6:21 PM
Subject: Anteater session support (Re: Anteater tests)


> On Sun, May 26, 2002 at 01:09:05PM -0500, Ivelin Ivanov wrote:
> >
> > I would like to add a few more test cases to the anteater-tests target
for
> > Cocoon 2.1.
> >
> > Very similar to the tests Ovidiu wrote for the flow calc
> > xml-cocoon2\src\test\anteater.
> > My tests will simulate user paths through the XMLForm demo.
> >
> > Everything seems pretty straightforward, but the one thing I need to
> > know is how to initiate a session and carry it over consequitive
> > steps.
>
> I don't think that's possible right now without a custom task. It's
> *almost* possible to emulate a session, eg you can capture the cookie:
>
> <match>
>   <header name="Set-Cookie" assign="cookie"/>
> </match>
> <echo>cookie is ${cookie}</echo>
>
> which prints:
>
> cookie is JSESSIONID=D37674C597C550D5E598740310A63695;Path=/cocoon
>
>
> And you can set cookies:
>
> <httpRequest ...>
>   <header name="cookie"
value="JSESSIONID=22C663C2A4C77751B1560328D2D5E2F1/>
>   ...
> </httpRequest>
>
>
> But I can't see an easy way to strip off that ';Path=..' bit at the end :(
>
> That, and problems with Tomcat4's chunked encoding[1] mean we really
> need to adopt a full-featured http client library. Ideally, I'd like to
> steal Latka's http abstraction layer, and then we can slot httpclient or
> whatever in underneath. Reusing Latka's layer would also make reusing
> validators/matchers across projects a lot easier.
>
>
> --Jeff
>
> [1]
>
http://sourceforge.net/tracker/index.php?func=detail&aid=547890&group_id=429
70&atid=434732
>
> > Thanks,
> >
> >
> > Ivelin
> >
> >


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