CAD Test-Driven Development and Agile Testing Flashcards
6 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 6 CAD Test-Driven Development and Agile Testing flashcards as text
What is the purpose of a 'test double' in TDD?
Answer: Replacing a real dependency with a simplified substitute for testing
A test double is any object that stands in for a real dependency (stubs, mocks, fakes, spies) to isolate the unit under test from external systems.
What distinguishes a 'mock' from a 'stub' in unit testing?
Answer: Stubs return hardcoded values; mocks verify that certain interactions occurred
Stubs provide canned responses to calls, while mocks also record and verify that expected interactions (method calls, parameters) occurred during the test.
What does code coverage measure in the context of TDD?
Answer: The proportion of production code lines executed by automated tests
Code coverage measures what percentage of production source lines, branches, or paths are exercised by the existing automated test suite.
In Behavior-Driven Development (BDD), what format are test scenarios typically written in?
Answer: Given-When-Then (Gherkin)
BDD scenarios use the Given-When-Then (Gherkin) syntax to describe behavior in plain language understandable by both technical and non-technical stakeholders.
What is 'regression testing' in an Agile context?
Answer: Re-running existing tests to confirm that new changes haven't broken previously working functionality
Regression testing ensures that new code changes do not introduce defects into existing, previously verified functionality, and is ideally automated in Agile CI pipelines.
Which practice involves the whole team — developers, testers, and the product owner — reviewing examples of system behavior to align understanding before coding?
Answer: Specification by Example (SbE) / Example Mapping
Specification by Example and Example Mapping are collaborative practices where concrete examples of behavior are discussed to eliminate ambiguity in requirements before development begins.