Classes of Tests
- Unit testing
- Regression testing
- Integration testing
Black Box Testing
Black-box testing is a method of software testing that tests the functionality of an application. A way to think about black-box testing is to look at both:
- The possible paths through the specification.
- The possible boundary cases.
Glass Box Testing
-
guideline
for loops
while loops
branches
-
path-complete
Test at least one time at each of the path.
In glass box testing, we try to sample as many paths through the code as we can. In the case of loops, we want to sample three general cases:
- Not executing the loop at all.
- Executing the loop exactly once.
- Executing the loop multiple times.
Bugs
-
Overt vs. covert
overt → \rightarrow → has an obvious manifestation
convert → \rightarrow → no obvious manifestation [HARDEST ONE]
-
Persistent vs. intermittent
occurs every time code is run
occurs some times, even if run on same input
Debugging
- Print statements
- Error messages [EASY]
- Logic error [HARD]
这节课感觉概念比较多。