CAD Agile Development Practices 2 — Questions and Answers
Question 1: In Test-Driven Development (TDD), what is the correct sequence of the Red-Green-Refactor cycle?
- Write a failing test, make it pass, then improve the code (Correct answer)
- Write passing code, add tests, then refactor
- Refactor existing code, write tests, then run them
- Write tests and code simultaneously, then refactor
Correct answer: Write a failing test, make it pass, then improve the code
TDD follows the Red-Green-Refactor cycle: write a failing test (red), write the minimal code to pass it (green), then refactor the code while keeping tests green.
Question 2: Which Agile practice involves team members explaining what they completed, what they plan to do next, and what impediments they face?
- Sprint Review
- Daily Scrum (Correct answer)
- Sprint Retrospective
- Backlog Refinement
Correct answer: Daily Scrum
The Daily Scrum (stand-up) is the Agile ceremony where each team member addresses three questions: what was done, what will be done, and what is blocking progress.
Question 3: What does 'continuous integration' primarily aim to prevent in Agile development?
- Scope creep
- Integration hell (Correct answer)
- Technical debt accumulation
- Gold plating
Correct answer: Integration hell
Continuous Integration prevents 'integration hell' by ensuring developers frequently merge code into a shared repository, catching conflicts and bugs early.
Question 4: A team is using pair programming. What is the primary role of the 'navigator' in this practice?
- Types the code while the driver reviews
- Reviews code in real time, thinks strategically, and guides direction (Correct answer)
- Runs automated tests after each code change
- Documents the code being written by the driver
Correct answer: Reviews code in real time, thinks strategically, and guides direction
In pair programming, the navigator reviews code as it is typed, thinks about the broader approach, and directs the driver on what to implement next.
Question 5: Which term describes the Agile principle of building features incrementally so working software is available early and often?
- Time-boxing
- Iterative and incremental delivery (Correct answer)
- Velocity tracking
- Definition of Done
Correct answer: Iterative and incremental delivery
Iterative and incremental delivery means software is built in small, functional slices each iteration, enabling frequent releases of working software.
Question 6: When a Scrum team realizes mid-sprint that a user story is much larger than estimated, what is the recommended Agile response?
- Extend the sprint deadline to finish the story
- Split the story and carry over the remaining work to the next sprint (Correct answer)
- Remove the story and close it as won't do
- Ask the Product Owner to reduce the acceptance criteria permanently
Correct answer: Split the story and carry over the remaining work to the next sprint
Splitting the story and carrying unfinished work to the next sprint preserves sprint timeboxing while ensuring valuable scope is not permanently dropped.
Question 7: What is the purpose of a 'Definition of Done' (DoD) in Agile development?
- To list all features planned for the product release
- To establish a shared checklist that must be met before work is considered complete (Correct answer)
- To define when a sprint goal has been abandoned
- To document the acceptance criteria for a single user story
Correct answer: To establish a shared checklist that must be met before work is considered complete
The Definition of Done is a team-agreed checklist (e.g., coded, tested, reviewed, documented) that every increment must satisfy before being considered shippable.
In Test-Driven Development (TDD), what is the correct sequence of the Red-Green-Refactor cycle?