SUnit Resource Problems

stéphane ducasse ducasse at iam.unibe.ch
Thu Aug 5 10:13:53 UTC 2004


On 4 août 04, at 20:00, Andrew P. Black wrote:

> At 10:20 +0200 2004.8.4, stéphane ducasse wrote:
>> Resources are normally set before any test run and teardown after all 
>> the test run
>> if I remember correctly.
>
> That is indeed what you imply in the tutorial;. But as far as we can 
> see, it is not what the code does.  It calls "reset", not "tearDown".

May be I refer to another version because SUnit releases are the mess.

>
>> In the tutorial I show how you can add sharedSetUp Test
>> that do not execute setup for all the tests of a test suite but that 
>> executes it for each test suite.
>> I really needed that and ressources were not the answer.
>
> Are you referring to the TestSuite>>areAllResourcesAvailable" stuff?
I do not remember. I wrote that so long ago and my code refers to VW 
SUnit version.

> We were confused because this is not what our version of SUnit does, 
> and assumed that the documentation was out of date, not that this was 
> a an enhancement.
>
> I don't see how what you describe above for "sharedSetUp" is different 
> from Resources, if they worked correctly.

A resources is initialized before **any** test runs, so one of your 
testsuite may invalidate the resource that is need in a certain state 
by another test suite. I discussed a lot with joseph about that and I 
will show why we need that with alan knight at ESUG. In moose for 
example, each test suite build a different model of a program, which is 
then accessed using a singleton, so the resources could not work there 
since testOne would run on a model that is not adequate (may be 
installed by the resources associated with testTwo).


>
> 	Andrew
>
>
>




More information about the Squeak-dev mailing list