Tuesday, May 20, 2008

A Unit Testing evangelist? Me?

Well, not altogether surprising, given my professional background, "once a tester always a tester" and all that.
But unit testing is your friend, really it is ..:)

Latest example:
I'm writing my first (very) small feature.
Completed the coding and the testing, was almost ready to integrate it.
Then it turned out my new class was supposed to be processing a different type of message altogether.
Ohmigod.
Well, less ohmigod since the messages are quite alike.
so, a bit of refactoring, most of it find/replace type of thing...

But... but... how do I know it still works???
My beloved (see earlier post) unit tests of course! They still run, so I haven't broke anything major with this refactoring ...

Monday, May 19, 2008

I still love to test

Here, I said it.
One of my favorite parts of being a dev, so far -has been to see my unit tests pass.
I love those little round green lights for each test that passes.
I love to make up scenarios , make a unit test out of them, and watch as my code passes them with flying (green :)) colors.
Aah, and since I'm still quite insecure about my coding abilities- this is pretty much the only thing that make me feel more secure about my code.
Quite a poster child for unit testing, I am :)

I wonder if this professed love of testing (most of my peers seem to view unit tests as necessity only ) means I'm a different kind of dev. A mixed breed....