CleanUp after failure

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

CleanUp after failure

Lennart Regebro-2
HI all, I'm new to selenium and have a bunch of questions.  I'll take
them in separate mails for clarity.

Is there anyway I can make sure I get some clean up run after the
selenium tests *even if they fail*? Now, if my test fail, it stops,
and then I have objects created that sholdn't be there.

--
Lennart Regebro, Nuxeo     http://www.nuxeo.com/
CPS Content Management     http://www.cps-project.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: CleanUp after failure

Alexandre Garel

Lennart Regebro a écrit :

>HI all, I'm new to selenium and have a bunch of questions.  I'll take
>them in separate mails for clarity.
>
>Is there anyway I can make sure I get some clean up run after the
>selenium tests *even if they fail*? Now, if my test fail, it stops,
>and then I have objects created that sholdn't be there.
>
>  
>
Maybe put a special test just after each test just to clean up.
For myself, I always begin my tests with a complete setUp of
database.(cleaning all moving parts + refilling)
I think it's essential to run tests with selenium to be in very precise
situations so you control everything (And don't have to look for
conditionals, etc... in your tests). If there are third party object
(web services ...) you don't control it may be harder and you may rely
on driven mode.
Hope it helps
Alex.




Ce message est protégé par les règles relatives au secret des correspondances. Il est donc établi à destination exclusive de son destinataire. Celui-ci peut donc contenir des informations confidentielles. La divulgation de ces informations est à ce titre rigoureusement interdite. Si vous avez reçu ce message par erreur, merci de le renvoyer à l'expéditeur dont l'adresse e-mail figure ci-dessus et de détruire le message ainsi que toute pièce jointe.

This message is protected by the secrecy of correspondence rules. Therefore, this message is intended solely for the attention of the addressee. This message may contain privileged or confidential information, as such the disclosure of these informations is strictly forbidden. If, by mistake, you have received this message, please return this message to the addressser whose e-mail address is written above and destroy this message and all files attached.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: CleanUp after failure

Lennart Regebro-2
On 1/13/06, Alexandre Garel <[hidden email]> wrote:
> Maybe put a special test just after each test just to clean up.

OK, that's a possibility... I might make a cleanup script, and simply
call that in this special test. ;)

> For myself, I always begin my tests with a complete setUp of
> database.(cleaning all moving parts + refilling)

Yeah, but that that will make each test take around 3 to 10 times as
long to run, so that's definitely not an option for me. The complete
tests would then run for hours and hours, and testing would grind to
an effective halt.

> (web services ...) you don't control it may be harder and you may rely
> on driven mode.

Yeah, I don't really "get" driven mode yet, so we'll see. ;)

--
Lennart Regebro, Nuxeo     http://www.nuxeo.com/
CPS Content Management     http://www.cps-project.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]