Tuesday, October 15, 2013

Week 5 - Unit Tests from HELL

We were given part 2 of Project 1 to implement. We are supposed to create unit tests for a provided open program. However, when trying to do the unit tests. I personally ran into a lot of problems. Besides not being able to have time to actually look through the code and being a complete novice when doing unit testing, a whole lot of the methods are considered to be private only. It makes it very hard to try and pick which methods to unit test based on the Cyclomatic complexity plugin for Visual Studio. Also, Cyclomatic lies to you about the actual complexity of a method. It does not say whether or not a method is dependent on a more complex method! And that dependent method could be private! This also made it very hard to try and unit test it. There was also a lack of documentation that came with the code project making it difficult to understand some of the logic behind these methods. Also, there was no overall plan by the designer of the program to understand what their vision for the project is. It was mostly was trial by fire and running around blind in the dark for this entire project. I learned a lot of harsh lessons from this project.

1. Do not outsource your unit testing to a third party without documentation

2. Only developers of the code should do unit testing because they would have a better understanding of their own code

3. If you are outsourcing your unit testing, be sure to have access to the original developers to the code to understand what they are thinking

4. Provide Documentation

5. Provide Documentation

6. PROVIDE DOCUMENTATION

No comments:

Post a Comment