Bad Tests Good Tests
Bad Tests, Good Tests - new book available!
Submitted by Tomek Kaczanowski on Mon, 12/16/2013 - 16:35I'm happy to announce the arrival of my new book! :) It is called "Bad Tests, Good Tests" and is all about writing high-quality tests.
Bad Tests, Good Tests - it is coming!
Submitted by Tomek Kaczanowski on Fri, 12/06/2013 - 22:11I 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.
You Shall Not Test Methods
Submitted by Tomek Kaczanowski on Tue, 06/18/2013 - 07:02When discussing unit tests it often happen that I hear that "unit testing is about testing methods". I do not agree, and because this is something which surfaces here and there so I think the idea deserves a comment.
A New-Old Book is Coming
Submitted by Tomek Kaczanowski on Tue, 03/05/2013 - 12:00My blog was quiet recently and for a good reason. The thing is that am working on a new book. Well, on two books, or maybe rather one and a half book. ;) Ok, here is the story.
JDays 2012 - Bad Tests Good Tests - Slides
Submitted by Tomek Kaczanowski on Mon, 12/03/2012 - 19:59I've promised to publish the slides from my JDays 2012 presentation "Bad Tests, Good Tests", so here they are.
Bad Tests Good Tests - Wasting Your Time
Submitted by Tomek Kaczanowski on Mon, 11/05/2012 - 22:17There are some things which are not worth unit-testing. Really, there are. Getters/setters and delegators are the best examples.
Bad Tests Good Tests - True, False and Magic Switches
Submitted by Tomek Kaczanowski on Mon, 10/08/2012 - 22:30If we expect our tests to act as a documentation then we need to put some effort into their readability.
Bad Tests Good Tests - Modification of Global State
Submitted by Tomek Kaczanowski on Wed, 09/19/2012 - 21:14For unit tests a rule of thumb is to keep them independent from each other. It is not so bad if we introduce a dependency on purpose (and explicitly declare it e.g. using TestNG dependsOnMethod
feature). A worse scenario is when we are not aware of the dependency ourselves. This can bring serious problems on our heads.
Looking for bad tests!
Submitted by Tomek Kaczanowski on Wed, 04/04/2012 - 17:58I'm looking for bad test code, so if you have some, please send me!
This used to be my blog. I moved to http://tomek.kaczanowscy.pl long time ago.