English subtitles

← How It Fits In The Loop - Software Testing

Get Embed Code
1 Language


Showing Revision 3 created 05/25/2016 by Udacity Robot.

  1. We go back to our overall master diagram.
  2. What we have is a driver's script which in this case was just the c program.
  3. We have a random test case generator which is basically two lines of code--one of them
  4. we had computed that used a random number to compute the number of bytes to read
  5. and the other one, actually called the read function.
  6. The software under test was the other function--the read all function that we wrote.
  7. The oracle was implemented by memory comparison function--that is to say
  8. did the read all command actually read the right bytes from a file--and so as we saw,
  9. the oracle never detect an error since we got the function right and everything work out.
  10. This case of implementing a read all call which is stand in for read that behaves better.
  11. It has been on my mind lately because I assigned this is as one problem on the final exam
  12. for my operating systems class that my students finished a couple of weeks ago.
  13. And it turned out that many of the students didn't implement the right code.
  14. A lot of times they forgot in the read all command, for example, to increment buffer so that
  15. subsequent calls to read wouldn't overwrite the original call to read.
  16. I saw so many of those that I decided I write the function myself and see if it was hard,
  17. and it was a little bit tricky but it worked out and that's why I thought it might
  18. make a good example for you all.