UNIT TESTS

I came from a highschool where although we were always required to have examples in our comments when making a method or function, but we didn't have unit testing, as far as I remember. During first semester, in my 108 class, I noticed at the bottom of our starter code there was a little if block which did 'unittesting'. At the time I didn't know what that was. Later I would learn that it would save me hours of time.

Back in the old day, before I knew about unit tests, I would manually run each of my programs, and even think myself clever for having all my lines pre-typed in an open Notepad file, ready to copy and paste one line at a time into Wing. I would honestly run each and every one of my examples manually, not knowing how to use unit test. It was during the second assignment in 108 when I learned what it did, and it really has saved me the most time. Unit tests are probably the highlight of my first year of university studying computer science, and it has definitely saved me the most time out of anything else this year.

To be able to run a program and test it's success all in one button press is an amazing feeling.

No comments:

Post a Comment