Free Online Flashcard Deck

11 Testing and Debugging Free Online FlashCards

Study 11 Testing and Debugging with 12 free online flashcards. Review key terms, definitions, and concepts with this interactive flashcard deck.

12 cards
01
Front

What is the difference between testing and debugging?

Back

Testing checks whether selected inputs produce the expected behavior; debugging investigates why actual behavior differs and removes the underlying defect.

02
Front

What is a syntax error?

Back

A syntax error violates the programming language’s grammar, so the program usually cannot start until the error is fixed.

03
Front

What is a runtime error?

Back

A runtime error occurs while a program is executing, such as when it divides by zero, accesses an invalid array index, or opens a missing file.

04
Front

What is a logic error?

Back

A logic error lets a program run but makes it produce an incorrect result because its implementation does not match the intended rule.

05
Front

What should you do first when debugging?

Back

Reproduce the failure with a small, reliable input and record the input, expected result, actual result, error information, and reproduction steps.

06
Front

Why is an error’s detected location not always its cause?

Back

The error location is where the program noticed the problem; the defect may have been introduced earlier, such as in a caller that constructed an incorrect value.

07
Front

Why form one specific debugging hypothesis?

Back

A specific hypothesis states what is wrong and why, allowing a focused test or inspection instead of unrelated edits.

08
Front

What can a debugger help you inspect?

Back

A debugger can pause at breakpoints, execute one statement at a time, inspect variables and expressions, evaluate stack frames, and use conditional or post-mortem debugging.

09
Front

What is the purpose of a program trace?

Back

A trace records important program state during execution, helping reveal incorrect updates, conditions, indexes, loop counts, or premature returns.

10
Front

What is a unit test?

Back

A unit test checks a small unit, such as a function, method, or class operation, in isolation; it normally includes setup, an action, and an assertion.

11
Front

Why are boundary cases important?

Back

Boundary tests examine values at or near valid limits, where incorrect comparison operators or loop bounds commonly cause defects.

12
Front

What does it mean to test the specification?

Back

Tests should verify the required result described by the specification rather than depend on implementation details such as sorting or a particular loop.