TDD in Legacy Code - Backlog Refinement
If you don't have clear Acceptance Criteria, you can't practice ATDD. It's more than just development, it all starts with requirements - executable requirements that are the executable tests.
🔒Hello, this is Valentina with a premium issue of the Optivem Journal. I help Engineering Leaders & Senior Software Developers apply TDD in Legacy Code. This article is part of the TDD in Legacy Code series. To get these articles in your inbox every week, subscribe:
Legacy Projects often have unclear requirements
In Legacy Projects, the problem regarding lack of tests goes beyond technical reasons - the problem of absence of test is also linked to a disconnect between requirements and testing. In Legacy Projects, often there are silos:
PO prepares requirements (or even worse, multiple POs with clashing viewpoints - an anti-pattern)
PO hands over the requirements to developers, so that developers do “coding“
Developers hand over the software to QA Engineers, so that QA Engineers can do “testing“
What’s the problem:
Developers don’t understand the requirements and don’t feel comfortable asking questions, due to the silo culture
QA Engineers have a different understanding of requirements compared to Developers, so even when Developers think they understand correctly, later on the QA Engineers say it’s not right
QA Engineers discover “edge case“ scenarios are the end, and developers are frustrated why that scenario wasn’t covered earlier
No Acceptance Criteria? ATDD is impossible
If we continue working like the above (the siloed way, separation of requirements & testing), ATDD is impossible. To practice ATDD, Backlog Items (User Stories & Bugs) need to have Acceptance Criteria.
But to have Acceptance Criteria, it means that the Backlog must have been refined.
How to refine Acceptance Criteria
Before we can start the ATDD cycle for some User Story (or Bug), we need Acceptance Criteria - executable specifications, which are simultaneously the requirements & tests, all-in-one.
Here are the steps to introduce Backlog Refinement in Legacy Code. I’ll provide you with step-by-step guidance on how to introduce Backlog Refinement in your GitHub Sandbox Project. ⬇️⬇️⬇️