Clean Tests

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