Testing Testing One Two Three
I have started testing. Or rather, learning how to test. Until now, I was a cowboy. I came out, two guns blasting. Or, rather, coding.
Now, I am learning out to test first, then code.
Test Driven.
The one argument that convinced me more than anything else had to do with errors. After writing code that works, you write some more code about something else. But it breaks a piece of code you had already written.
Testing will tell you this.
In that past, someone months later would kindly let me know about it. Or, they wouldn’t. And I was oblivious to the broken function.
Now, I can find out by myself, much faster.
The second reason I moved over to testing was that it is faster. I used to write the code, then go check it in the browser. Sometimes over many pages. Now, I run one command and all the tests go for me in about a second.
Done.
And if something is broken, my tests tell me where.
Nice.