Hi Barbara,

> -----Original Message-----
> From: Barbara Allori [mailto:[EMAIL PROTECTED]
> Sent: lundi 14 f�vrier 2005 14:28
> To: Cactus Users List
> Subject: Test execution
> 
> Hi,
> 
> I know that the test execution is:
> 
> setUp()
> testXXX()
> tearDown()

Actually Cactus does not control this. It comes from JUnit's TestCase class
and the algorithm is:

public void runBare() throws Throwable {
                setUp();
                try {
                        runTest();
                }
                finally {
                        tearDown();
                }
        }

> 
> So, even if the testXXX() doesn't pass I'm expecting the tearDown() to
> be executed.
> What should happen if the error is in the setUp() method intead of
> testXXX(). It appears that the tearDown() doesn't execute: is this
> correct?

Hmm... No it's not correct. The teardown() should always execute.

I have attached the test that we have inside Cactus to verify this feature
works.

Thanks
-Vincent

> 
> Thanks
> 
> Barbara
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


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

Reply via email to