← All CAD Flashcard Decks

Testing & Debugging Flashcards

7 cards from real CAD practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 7 Testing & Debugging flashcards as text
  1. What type of testing verifies that individual components or functions work correctly in isolation?

    Answer: Unit testing

    Unit testing focuses on testing individual components or functions in isolation to verify each piece works correctly on its own.

  2. Which debugging technique involves adding output statements to track program flow and variable values?

    Answer: Print/log debugging

    Print/log debugging inserts output statements to display variable values and execution flow without requiring specialized tooling.

  3. What is the purpose of a regression test?

    Answer: To verify previously working functionality still works after code changes

    Regression tests confirm that recent code changes have not broken functionality that was previously working correctly.

  4. In test-driven development (TDD), what is the correct order of steps?

    Answer: Write test → Write code → Refactor

    TDD follows the Red-Green-Refactor cycle: write a failing test first, write minimal code to pass it, then refactor for quality.

  5. What does 'code coverage' measure in a software testing context?

    Answer: The percentage of source code executed during testing

    Code coverage measures what percentage of the source code is actually executed when the test suite runs, indicating how thoroughly the code is tested.

  6. Which type of testing is performed without knowledge of the internal code structure?

    Answer: Black-box testing

    Black-box testing evaluates application functionality based solely on inputs and outputs, without any knowledge of internal implementation.

  7. What is a 'mock object' in the context of unit testing?

    Answer: A simulated object that mimics the behavior of real dependencies

    A mock object simulates the behavior of real dependencies such as databases or APIs, allowing unit tests to run in complete isolation.