Recently I've spent some time browsing the Net and learned about some new stuff ("new" meaning "new to me") that I would like to share with you. Let us have a look at HavaRunner, some nice TestNG reports, and TDD Katas.
The slides from my short talk about JUnit and TestNG on 18 April 2013, BrighTalks.
To view the presentation click here.
During one of my conference talks I got an interesting question: "why do you prefer to test exceptions using catch-exception library instead of using ExpectedException Rule of JUnit?". This is a good question, so let me answer.
Some time ago I was complaining about the stagnancy of JUnit. This project - even if used by the majority of Java developers - looked abandoned. No new releases, no activity on the mailing list, no updates on the website. However in recent weeks things started to look better. I would like to share with you some comments regarding JUnit current progress.
The default support for parameterized tests is one of the greatest weaknesses of JUnit. Let us see how Zohhak can help.
There are some things which are not worth unit-testing. Really, there are. Getters/setters and delegators are the best examples.
If we expect our tests to act as a documentation then we need to put some effort into their readability.
For 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.
Recently I've joined a new team and I wanted to persuade my colleagues to migrate from JUnit to TestNG. I decided to prepare a short presentation to convince them. I publish it here hoping that you will find it useful.
I've joined a new team recently and (to my horror and dismay ;) I've found out that we use JUnit! Well, I just had to do something about it, namely switch to TestNG ASAP! :)