Question

Currently, I'm working on an application with long launch time which is about 1,5min to start two of its main modules. How should I approach testing new functionalities in such applications given that I need those modules to initialize properly (caches, connection pool etc)? This seems like a waste of time to test every single change and waiting such long time.

Should I try to make my functionalities less dependent of the whole system design? I'm sure it's not always possible. Lot's of TDD examples on the Internet concentrate on small 3 classes examples

What is your experience? How to deal with it?

Was it helpful?

Solution

Yes, you should try to break dependencies so that functionality can be tested in very small units. This is the essense of TDD and it is hard to do it successfully if you don't.

Here's an interesting little commentary on TDD:

http://www.industriallogic.com/blog/history-microtests/

If you have legacy code with lots of dependencies, Michael Feathers writes about how to deal with that:

http://www.amazon.com/Working-Effectively-Legacy-Michael-Feathers/dp/0131177052

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top