English subtitles

← Domain Specific Knowledge - Software Testing

Get Embed Code
1 Language

Download

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

  1. Due to their structure, we only executed further into the for loops
  2. and implemented these functions when bits were the same.
  3. If every bit was independently different, then the probability of executing further into these functions
  4. dropped off exponentially, and so at 64 bits, the probability dropped off too fast
  5. for us to ever execute the case where a and b were the same.
  6. Based on that knowledge, based on some domain specific knowledge, we made a new
  7. random tester whereby flipping a random number of bits did a much more even exploration
  8. of the iteration spaces of those loops including reaching the ending state, which is what we saw
  9. on that GCC documentation was the state that we actually wanted to test.
  10. This has been a pretty elaborate exercise for what in the end
  11. are two pretty simple functions and what this just shows is that you can do okay
  12. with a really simple random tester and not understanding what's going on, but if you wanted
  13. to do a better job we really need to think about what it is that we're testing,
  14. how the code is structured, and how we're going to execute all the way through it,
  15. and this is just sort of a fundamental limitation of random testing.