Sunday, September 18, 2011

Acceptance Tests

      On Friday my partner and I spent a couple of hours working on PFD, and we were thrilled when we thought we had got it working. It was passing all the unit tests, and we thought it was ready to be entered into Sphere. However, when we submitted the solution to Sphere, it failed! We were uncertain why that happened, and so we decided to write more unit tests. The unit tests were passing, but Sphere wouldn't accept our solution.
 We realized that it must be a lack of understanding of the problem on our part. We needed more tests, from other people.
      Luckily some people had uploaded their acceptance tests to the public repo, and we used some of those. After looking at the tests, we realized that it was indeed a lack of understanding of what the problem wanted that caused our solution to fail. I think Acceptance Tests are very important for the programmer to gauge correctly what the specifications of a problem are. I don't like Sphere for this reason, since Sphere only gave us one sample test (The fact that the webpage would not load correctly on any browser except IE is a whole other gripe). One sample test is not enough to explain what the problem is actually asking for.
     Anyway, we fixed our logic, and got our program accepted by Sphere. I am so thankful that we all have to upload a thousand acceptance tests to the public repo, it really helped us out! We need to write a test generator now, which will enable us to help some of our classmates out in return!
     The reading for the past week was pretty good, finished reading Extreme Programming, and read some articles that highlight the importance of checking for overflows. We learned about exceptions in class, which I found really interesting and useful. I had a very vague idea of exceptions before this, and I liked learning about them.

No comments:

Post a Comment