Monday, October 8, 2012

Last check in beofre the deadline

So I've just finished writing what I can of my unit tests. I do wish the programm picked to do a unit test had been screened a bit better. I suppose in the real world you don't get a choice like that so it is what it is. I chose to make all of my tests come out of the same class so that I could focus on one aspect of the program rather than having to learn about the project as a whole. This aproach had it's advantages and disadvantages.

One of the big advantages was that I felt pretty good command of the file I was looking at. I found out which functions had to work together and it was all written by one programmer so the style didn't change much throughout the file.

The biggest disadvantage was that I had almost no idea how the class I was focusing on was supposed to function as a part of the whole. Setting up my tests proved difficult as I didn't really know what functions to call to initialize properly or even which variables needed to be initialize.  I was even hazy on how far into the whole process my parts were being used.

A second disadvantage I had to work with was the fact that the code I chose to test wasn't complete. there were two classes at the bottom of the file that said something along the lines of "this isn't done, let's finish this later"  and three of the four functions I test make calls to this function. As aresult my tests fail off the bat and it's rather difficult to tell if the tests are effective or not. I did a little bit of commenting lines of code out while I was writing the test just to see if I could get some aspects to pass. certainl not ideal.


On an equally gloomy note I've checked in with the team and everyone is scrambling to get things submitted to perforce. I'm the only one with a check in thus far and it looks like I'm going to have to just trust everyone to get it handed in on time as I won't be able to nag everyone while I'm at work tomorrow. As a result I think i'll have to wait until after class tomorrow to hand in the assesments.  here's to hoping it all goes as planned.

No comments:

Post a Comment