Articles about tdd

Helping you solve those tough coding problems since 2009!

Speeding up my unit tests

Published on Apr 28, 2014

I hope this isn’t too extremely obvious, but I found that I had to take a step back and re-examine my unit tests to find this simple improvement to speed up my unit tests.

When I wrote about how I’m hooked on test-driven development (TDD), the example in that post was too simple and time savings are not noticed.  However, let’s dive in to something a little deeper where we have a full class to test oppose to a single internal function.

I'm hooked on test-driven development (TDD) with a Fizzbuzz C# Example

Published on Aug 6, 2013

I’ve only been doing TDD for a few weeks, but I’m completely sold.  I don’t want to go back!  I’ll be honest though, it hasn’t been easy.  I’ve made mistakes, I’ve wasted time, but I’m really starting to reap the benefits.

I’ve always thought I was a good developer.  I write decent code and it works mostly as expected.  It took me many years into my career before I wrote my first unit test.  It always fell into the category of too time consuming or expensive.  Oh the irony!

As I started learning how to write to unit tests, I always found myself rewriting things I already did just to get them to be unit tested; how frustrating!  A unit test that should have only took a few minutes, ended up taking a really long time because the code had to be refactored just to be tested.  No better way to turn you off from unit testing.

Enter test-driven development…

Tutorials

Learn how to code in HTML, CSS, JavaScript, Python, Ruby, PHP, Java, C#, SQL, and more.

No matter the programming language you're looking to learn, I've hopefully compiled an incredible set of tutorials for you to learn; whether you are beginner or an expert, there is something for everyone to learn. Each topic I go in-depth and provide many examples throughout. I can't wait for you to dig in and improve your skillset with any of the tutorials below.