SUnit Resource Problems
Markus Gaelli
gaelli at emergent.de
Thu Jul 29 08:41:04 UTC 2004
Hi Peter,
Do you use test suites?
as far as I understand it, you would want to use test suites to handle
test resources.
There is
TestSuite >> run
(...)
[self run: result] sunitEnsure: [self resources do: [:each | each
reset]].
^result
which should do the cleanup at the end.
Stef wrote a nice intro on SUnit on:
http://www.iam.unibe.ch/~ducasse/Programmez/OnTheWeb/Eng-Art8-SUnit-
V1.pdf
As far as I can tell, there is no test/example which clarifies that
behavior, so it would be great if you could enhance the
SUnit-Tests accordingly.
Hope this helps,
Markus
On Jul 29, 2004, at 2:18, Peter Keeler wrote:
> I'm trying to set up an SUnit test that uses a TestResource. The
> "resource" is a bunch of traits that need to be created one time at the
> start of the test run and deleted at the end of the test run, and are
> looked at but not modified by any of the tests (so they don't need to
> be
> cleaned up between tests; it would take far too long).
>
> The trouble I'm having is that SUnit appears to call setUp on the
> resource, but never calls tearDown. Are there any SUnit hackers out
> there
> that can tell me whether resources in SUnit are known to be broken (in
> which case maybe I could help fix them) or whether I'm just doing
> things
> the wrong way? I wasn't able to find any useful documentation on the
> right
> way to do it, so I've been figuring it out just by reading the code.
>
> Thanks,
> Peter
>
>
>
More information about the Squeak-dev
mailing list
|