Testing and Evaluation unit 2 Flashcards
(10 cards)
What is a logic error?
Where your program does something unexpected.
What is a syntax error?
Where you’ve broken the rules of the language, like missing a bracket or keyword.
What is a runtime error?
An error that happens while the program is running, such as dividing by zero or opening a missing file.
What is a trace table used for?
To manually follow an algorithm step-by-step and track the values of variables at each stage.
What should be included in a test plan?
Types of tests, test data, expected results, and how to tell if the program meets the requirements.
What are the three main types of test data?
- Normal data: data that is well within the limits of what should be accepted. e.g. Age = 25
- Boundary data: data that is at the outer limits of what should be accepted (range). e.g. Age = 0 or Age = 120 (if 0–120 is valid)
- Erroneous data: data that should not be accepted by the program. e.g. Age = -5 or Age = “twenty-five”
Why is testing important?
To make sure the program works as expected and handles errors properly.
How do you determine the value of a variable at a given point?
Use a trace table or follow the code step-by-step to see how the variable changes.
What does it mean to evaluate a program?
To look at its strengths and weaknesses, and suggest improvements.
Give one example of improving a program.
Use subprograms to reduce repetition, or add input validation for better error handling.