Test Case Discussion
- The boundary values for this problem are 90, 80, 70, and 60.
- These are the values where the output changes from one letter grade to another.
- Notice that the test plan tests the boundaries with test cases right at the
boundary and also with test cases just above and just below the boundary values.
-
The "branches" for this problem are each of the letter grades.
- The branch
cases are the ones that test each letter grade with a value that is not
a bounds test, for instance 95.0.
- Your test plan should have at least one
branch test for each branch, in this case one for each letter grade.
- The error test is -92.0.
- We can consider it an error test case because it is
unexpected input.
- It is important that we think about input like this
and make sure our algorithm handles it in a reasonable way.
- According to
our test plan we will handle negative values as F, but we could decide
to handle it as something else, such as ?.
- What about the 103.64 test case? Is it a definitely a branch test?
- The
answer to that question depends on your analysis of the problem.
- Is it possible
to have a score over 100%? If so, then it is a branch test and is testing an A
that is more that 100%.
- If it was impossible to have a score over 100%,
the we should consider it an error case.
- In that case, the output should NOT
be an A.
- You may decide to have a cutoff for the upper value that is
an A, for instance 110%.
- If so, then 110 is another boundary for you to test
and you would need to add another error test, one that is more than 110%.