Wednesday, October 1, 2008

The Limits of Test Coverage

Having a partner for this program made it easier to sort through the issues that I was having, especially since my partner was farther along than I was. In this case my partner was Creighton Okada and from him I picked up on some of the assert methods that I should be using.

Adding Failure

In order to create a unit test that failed I added a method to the test code that will check the size of the array. I intentionally made it so the expected value was less than the actual size to make the test fail. When Emma was ran, it reported 100% coverage but when Junit ran the test code it failed.

Conclusion

This shows that there are limits to Emma. It appears that Emma only really checks whether the lines in the code is executed and not whether the test cases are actually valid. Pair programming helped me but I think it would've been better if we were both in at the same point in our progress.

The project can be found here.

No comments: