You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Jason Vinton <ec...@hotmail.com> on 2003/09/17 02:16:40 UTC

begin(...) and end(...) methods

In the "Writing Tests" section of the cactus site there is a section that 
reads:


Step 5 (optional): begin() and end() methods

    begin(...) and end(...) methods are the client side equivalent of the 
setUp() and a tearDown() methods (see previous step). They are called on the 
client side, before and after every test.

    The begin() and end() methods are optional.


I've observed that when the test fails, the end() method is not called.  
It's unclear to me if this is a bug or by design.  I'm not sure if this is a 
shared opinion, but I believe that it would be very helpful to have a method 
on the client side that is always called to do clean-up.

Jason Vinton
Moody's

_________________________________________________________________
Fast, faster, fastest: Upgrade to Cable or DSL today!   
https://broadband.msn.com


RE: begin(...) and end(...) methods

Posted by Vincent Massol <vm...@pivolis.com>.
Hi Jason / Magnus,

My only worry is that the WebResponse will probably not be valid and the
main goal of end()/endXXX() are to verify it...

I'm not opposed to implementing what you say, but this is changing the
current goal of the end() method. Can you give me a use case where it is
needed? Why can't you do your cleanup in tearDown() as you would do with
any JUnit test case (and a Cactus test is a JUnit test case)?

Thanks
-Vincent

> -----Original Message-----
> From: Jason Vinton [mailto:eccebonum@hotmail.com]
> Sent: 17 September 2003 02:17
> To: cactus-user@jakarta.apache.org
> Subject: begin(...) and end(...) methods
> 
> In the "Writing Tests" section of the cactus site there is a section
that
> reads:
> 
> 
> Step 5 (optional): begin() and end() methods
> 
>     begin(...) and end(...) methods are the client side equivalent of
the
> setUp() and a tearDown() methods (see previous step). They are called
on
> the
> client side, before and after every test.
> 
>     The begin() and end() methods are optional.
> 
> 
> I've observed that when the test fails, the end() method is not
called.
> It's unclear to me if this is a bug or by design.  I'm not sure if
this is
> a
> shared opinion, but I believe that it would be very helpful to have a
> method
> on the client side that is always called to do clean-up.
> 
> Jason Vinton
> Moody's
> 
> _________________________________________________________________
> Fast, faster, fastest: Upgrade to Cable or DSL today!
> https://broadband.msn.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org



SV: begin(...) and end(...) methods

Posted by Magnus Mickelsson <ma...@telia.com>.
Hi Jason,

We talked a bit about this earlier on this list.
Take a look in the archives here:
http://www.mail-archive.com/cactus-user%40jakarta.apache.org/msg03865.html

I agree with you - it would be helpful to have a method for cleaning up on
the client.

/MM

> -----Ursprungligt meddelande-----
> Från: Jason Vinton [mailto:eccebonum@hotmail.com]
> Skickat: den 17 september 2003 02:17
> Till: cactus-user@jakarta.apache.org
> Ämne: begin(...) and end(...) methods
>
>
> In the "Writing Tests" section of the cactus site there is a section that
> reads:
>
>
> Step 5 (optional): begin() and end() methods
>
>     begin(...) and end(...) methods are the client side equivalent of the
> setUp() and a tearDown() methods (see previous step). They are
> called on the
> client side, before and after every test.
>
>     The begin() and end() methods are optional.
>
>
> I've observed that when the test fails, the end() method is not called.
> It's unclear to me if this is a bug or by design.  I'm not sure
> if this is a
> shared opinion, but I believe that it would be very helpful to
> have a method
> on the client side that is always called to do clean-up.
>
> Jason Vinton
> Moody's
>
> _________________________________________________________________
> Fast, faster, fastest: Upgrade to Cable or DSL today!
> https://broadband.msn.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.515 / Virus Database: 313 - Release Date: 2003-09-01
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.515 / Virus Database: 313 - Release Date: 2003-09-01