List/Grid Tag Archives: Testing

JUnit Pass Test Case on Failures
Why create a mechanism to expect a test failure? There comes a time when one would want and expect a JUnit @Test case fail. Though this is pretty rare, it happens. I had the need to ...

Test Driven Traps, part 2
The Story of a Unit in Unit Tests In the previous part of this article, you could see some bad, though popular, test samples. But I’m not a professional critic (also ...

Test Driven Traps, part 1
Have you ever been in a situation, where a simple change of code, broke a few hundred tests? Have you ever had the idea that tests slow you down, inhibit your creativity, make you afraid ...

The crystal ball illusion
I have noticed that people sometimes avoid doing thorough testing. This may sound as bogus to some, but hear me out… I do understand why this happen. Tests can create a feeling of ...

Spring Testing Support and Context caching
Spring provides a comprehensive support for unit and integration testing – through annotations to load up a Spring application context, integrate with unit testing frameworks ...

Maven Cargo plugin for Integration Testing
A very common need in the lifecycle of a project is setting up integration testing. Luckily, Maven has built-in support for this exact scenario, with the following phases of the default ...

5 Tips for Unit Testing Threaded Code
Here’s a few tips on how take make testing your code for logical correctness (as opposed to multi-threaded correctness). I find that there are essentially two stereotypical patterns ...

Help, My Code Isn’t Testable! Do I Need to Fix the Design?
Our code is often untestable because there is no easy way to “sense1” the results in a good way and because the code depends on external data/functionality without making it possible ...

A Classification of Tests
There are many ways of testing software. This post uses the five Ws to classify the different types of tests and shows how to use this classification. Programmer vs Customer (Who) Tests ...

Tips for testing with Java
Introduction I love automated testing. In a rare diversion into op-ed1 I thought a put few thoughts (read – opinions) together. Before I start on how best to compose ...


