Bad Tests, Good Tests - it is coming!

I can't remember when it started but since some time I was collecting "interesting" pieces of test code. By "interesting" I mean the ones that could be well improved. After some time I noticed there are some (anti)patterns, some typical bugs, or rather imperfections which I observe frequently when reviewing test code.

I try to write my tests so they fulfil some basic requirements. They should verify some important part of the system. They should survive refactorings. They should be readable, clear and concise, so you can read them like documentation. They should be fast.

I've learned that very often a minor change can improve test code significantly and bring it closer to fulfilling these requirements. Then I decided the whole thing about imperfect tests and ways of making them better is worth to be shared with you.

Today my new book - Bad Tests, Good Tests - is ready. It contains many tips/patterns/rules (or whatever you call them) related to typical bugs we do when writing tests. I'm pretty sure your tests will get much better after you read the book!

The book is available!

This used to be my blog. I moved to long time ago.


Please comment using