jUnit

HavaRunner, TestNG Reports and TDD Katas

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.

 

JUnit And TestNG - Similar Or Different?

The slides from my short talk about JUnit and TestNG on 18 April 2013, BrighTalks.

To view the presentation click here.

 

JUnit ExpectedException Rule vs. Catch-Exception

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.

 

JUnit Strikes Back

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.

 

Zohhak - JUnit Parameterized

The default support for parameterized tests is one of the greatest weaknesses of JUnit. Let us see how Zohhak can help.

 

Bad Tests Good Tests - Wasting Your Time

There 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

If 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

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.

 

Why TestNG and not JUnit?

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.

 

From JUnit to TestNG - migration story

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! :)

 

 
 
 
This used to be my blog. I moved to http://tomek.kaczanowscy.pl long time ago.

 
 
 

Please comment using
 
Syndicate content