Return to Video

01-10 What We Learn Solution

  • 0:00 - 0:05
    Okay, so if we passed this test case, then obviously, yes, we've learned at least that much.
  • 0:05 - 0:07
    It isn't completely useless.
  • 0:07 - 0:11
    Does our code pass any test case where we replaced 7 with a different integer?
  • 0:11 - 0:17
    Well, maybe not--if you replace 7 with a gigantic integer--
  • 0:17 - 0:20
    something you can't even store on your computer it's so big--
  • 0:20 - 0:23
    then you're probably not going to get the same behavior
  • 0:23 - 0:26
    out of these test cases with something simple like 7.
  • 0:26 - 0:30
    We can't necessarily say this. I would say that as well.
  • 0:30 - 0:35
    Now, our code passes many test cases where we replaced 7 with a different integer. This is true.
  • 0:35 - 0:41
    If we were to replace 7 with say 20 and replaced it down here as well,
  • 0:41 - 0:44
    then yes--this should behave essentially the same.
  • 0:44 - 0:48
    And it should behave essentially the same for many, many integers.
  • 0:48 - 0:53
    Certainly not integers that have very large stored space requirements,
  • 0:53 - 0:59
    or maybe it doesn't store integers past a certain static typing.
  • 0:59 - 1:07
    For example, if you're storing a type in your queue that is only able to store very small integers,
  • 1:07 - 1:11
    let's say, shorts which are typically much smaller, then yes, this won't work.
  • 1:11 - 1:15
    So the question is--what exactly do we learn,
  • 1:15 - 1:22
    and how do we make test cases that represent large a number of other potential test cases
  • 1:22 -
    so we don't have to write a whole lot of very small simple test cases?
Title:
01-10 What We Learn Solution
Description:

01-10 What We Learn Solution

more » « less
Team:
Udacity
Project:
CS258: Software Testing
Duration:
01:28
Udacity Robot edited English subtitles for cs258 unit1 18 s What We Learn
Amara Bot added a translation

English subtitles

Incomplete

Revisions Compare revisions