Chapter 15 - Testing and debugging Flashcards
What is a fault?
What is the difference between testing and debugging?
What is a test case?
It consists of a specific input to the code, or a usage scenario performed under certain conditions.
What are the components of a test case?
- the input(s) for the test case.
- the expected output(s) for the given input(s).
- the reason for the test case.
What is the difference between black box and white box test case?
Black box: If we generate test cases for an algorithm/program/function using knowledge of only the expected behavior of the program or function, and without knowledge of the actual code (Cant see anything in the ‘Black box’).
White box: When we generate test cases for the for the code we are testing (Can see everything in the ‘white box’).
What are test drivers?
A program that contains the implementation of the test cases.
Are test drivers NEEDED for testing?
No they are not needed but are better to have in the long run.
What do you need to write black box tests?
Inputs, outputs, and reason.
Can testing be done with out code?
Can you write code based black box tests?
Why might we want to do white box testing?
What are three benefits of white box testing?
Which comes first, the test or the code?
What are three different methods of debugging?