Integration Testing

Writing Clean Tests - Beware of Magic

Magic is the arch enemy of readable code, and one of the most common form of magic which can be found from our code is a magic number. Magic numbers litters our source code, and transforms it into a pile of unreadable and unmaintainable rubbish. That is why we should avoid magic numbers at all […] Read more

Writing Clean Tests - Naming Matters

When we are writing automated tests for our application, we have to name our test classes, our test methods, fields of our test classes, and the local variables found from our test methods. If we want to write tests which are easy to read, we have to stop coding on autopilot and pay attention to […] Read more

Writing Clean Tests - It Starts From the Configuration

The first thing that we have to do when we start writing either unit or integration tests is to configure our test classes. If we want to write clean tests, we must configure our test classes in a clean and simple way. This seems obvious, right? Sadly, some developers choose to ignore this approach in […] Read more

Three Reasons Why We Should Not Use Inheritance In Our Tests

When we write automated tests (either unit or integration tests) for our application, we should notice pretty soon that Many test cases use the same configuration which creates duplicate code. Building objects used in our tests creates duplicates code. Writing assertions creates duplicate code. The first thing that comes to mind is to eliminate the […] Read more

I have written about the challenges of writing unit tests for applications which use Spring Social 1.1.0 and provided one solution for it. Although unit testing is valuable, it doesn’t really tell us if our application is working correctly. That is why we have to write integration tests for it. This blog post helps us […] Read more

Why I Write Tests?

I write software which is used to manage sensitive information. It doesn't really matter what kind of information my software deals with. The only things that matters are Only authorized persons can access that information. The information must be correct at all times. Also, often the first requirement is a lot more important than the […] Read more