unit testing - How to deal with memory leaks when following TDD -


say want follow pure tdd i.e. write unit tests before writing other code. when find bug must write unit test reproduces , implement fix.

say there's memory leak in application. can reproduce - running particular method 1,000,000,000 times causes outofmemoryexception. test takes 10 seconds fail.

long running unit tests not welcomed when consume lots of memory. later there may other memory leaks number of such tests may increase.

so how fix bug tdd-way?

write test demonstrates used memory did not go above threshold, not ran out of memory.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -