[squeak-dev] ENH: SUnit - shuffling the order tests are executed in

Brent Pinkney brent at zamail.co.za
Thu Aug 14 16:12:29 UTC 2008


Hi,

I would like to propose an enhancement to SUnit:

Currently the order in which TestCase #test... methods are executed by TestSuite is fixed.
This can cause dependencies to creep in if 
	a) the TestCase class uses a TestResource and 
	b) one #test.. method alters an aspect of the TestResource that another #test... assumes is invariant.

By adding #shuffle to TestSuite >> run:, it is more likely that this corruption is exposed.

viz.
	TestSuite >> run: aResult
		self tests shuffled do:
			[ :each |
			self changed: each.
			each run: aResult ]
	!

Please comment and I will submit a fix.
PS. Who maintains SUnit ?

Brent


-- 
Brent



More information about the Squeak-dev mailing list