Junit 4 adds class level setup/teardown which is nice for this kind of
thing.  However, I
don't think that it is really needed.  Class level setup is really just to
decrease the cost
by amortizing an expensive setup over several tests.

IF the tests are assumed to execute in order, however, then it really should
just be one
big test and class level setup isn't required.

IF they aren't assumed to be in order, then why do they need to have their
temp files in the
same place?

Either answer leads to test level setup/teardown rather than class level
operations.

On Mon, Oct 4, 2010 at 3:20 PM, Sean Owen <[email protected]> wrote:

> The idea in JUnit is that each test method is independent of the others.
> All
> set up is done in setUp() (and undone in tearDown()) if needed. So the
> JUnit
> way to do this is to set it up in setUp(). And I think we should stick to
> the JUnit way since as you see it doesn't work otherwise :) Sounds like
> what
> you have is one big test method.
>
> On Mon, Oct 4, 2010 at 11:17 PM, Robin Anil <[email protected]> wrote:
>
> > The temp folder gets deleted after each test. Its not getting preserved
> > across tests. Thats why things are failing. Can you tell me how I can
> keep
> > the dir for the entire duration of the Test File Suite?
> >
> >
>

Reply via email to