Follow @endyourif rss Facebook LinkedIn

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Ö