Articles related to TDD

Semantic Comparison: Improve Test Assertions

One of the traits of a good unit test is to have just one Assert statement. . Consider Assert failures as symptoms of a disease and Asserts as indication points or blood checks for the body of the software. The more symptoms you can find, the easier the…

Use Tests As A Feedback Tool To Improve Code

A unit test suite provides immediate feedback when you make a change. A passing test suite gives the confidence on the changes made. It's the confidence that the team has on the tests suite that matters more than the code coverage number . Tests also provide…

Tip of the Week: AutoFixture - Make Your Unit Tests Robust

AutoFixture is an open source library for .NET designed to minimize the ' Arrange ' phase of your unit tests in order to maximize maintainability. Its primary goal is to allow developers to focus on what is being tested rather than how to setup the test…

Populating Data for Tests

Populating data for tests is the section of the test that usually ends up making tests more coupled with the code that it is testing. Coupling makes tests more fragile and refactoring code harder because of breaking tests. We should try to avoid coupling with…

Introduce Tests when Fixing Bugs

When creating a subscription for a client, the calculated number of months was off by one at times - This was a bug reported from production application that I was currently working on. Though, not a blocker, it was creating enough issues for the end users…

Refactoring to Improve Testability: Extracting Dependencies

In the earlier post, Removing Unnecessary Dependencies , we saw how having an unnecessary dependency hinders testability. In this post we will see just the opposite of that - extracting functionality out of a class and creating another class to separate…

Refactoring Test Code: Removing Constructor Dependency

In the earlier post, Removing Unnecessary Dependencies , we saw how having an unnecessary dependency hinders testability. In this post we will see how the test code changed by the refactoring we did for removing the unnecessary dependency and explore ways to…

Refactoring to Improve Testability: Removing Unnecessary Dependencies

Nowadays I am trying to stick to TDD (with the test first approach) and have found it to be of great help. One of the biggest reward doing TDD is that it helps me to stay in the flow and regain speed faster after a distraction. This post explains how to…

Is Code Coverage a Lie?

Code Coverage has been one of the important things that was always there on a daily build report and a number that managers were both interested and worried about. This has been the same for all projects that I had worked on, across various organizations…

TDD and Refactoring

Over the days I have been reading on Test Driven Development(TDD) and it seems really interesting methodology to go with as per development is concerned. Basic of TDD is that the development process relies on 'tests', that are written prior to code. Sounds…

Subscribe to rahulpnath.com

And get the latest articles delivered right to your inbox!