Hi, <br> I just wanted to share with you that we had problems running too many tests with SUnit because of memory use.<br> We have around 15,000 unit tests and while running them the memory grew from 80 megs to 700 megs (we use VisualAge) and therefore, the machine became really slow...<br>
Anyway, we realized the memory was not freed because the tests referenced objects from their instance variables. Therefore we added a method that puts "nil" in all test's instance variables (but 'selector'). <br>
The amazing thing is that not only running the test now do not makes the image to grow but it takes 50% less time to run them! So anyway, we are happy with that and maybe this change is useful to other people.<br> Here is the code: <br>
<br>TestCase>>runCase<br><br> [self setUp.<br> self performTest] sunitEnsure: [self tearDown;cleanUpInstanceVariables]<br><br>TestCase>>cleanUpInstanceVariables<br><br> (TestCase allInstVarNames size + 1) to: self class allInstVarNames size do: [ :index | self instVarAt: index put: nil ]<br>
<br><br>Bye,<br>Hernan.<br>