Thursday, April 16, 2015

The consequence of using Test Double

”With great power comes great responsibility”. This quote of Uncle Ben was and is with Peter Parker through all his career as a Spider-Man. It was used to describe how we should handle with difficult situations in our lives and that each choice we make can have an impact not only on ourselves, but also on many other people. I think that quote should be the sentence that each developer will repeat all over again. Just a sec before he/she will starts using Test Double (TD). Because TD gives as the great power which allow us to control everything around tested unit. And yes, it makes everything easier, but as Einstein said: “Everything should be made as simple as possible, but not simpler.“.

Each choice you made while you were deciding whether to use or not TD has impact on tests readability, code coverage, tests value, ease of introducing changes or doing refactoring. Each choice you made has impact on your team mates and probably even on those developers that you don’t even know yet.

That’s why we have to made our choices conscientiously and carefully.

That’s why it is so important to have as wide knowledge about used tools and techniques as possible.