The Three Amigos strategy in Agile development is one of the most efficient and effective approaches to designing unambiguous, actionable user stories. This approach -- involving the so-called Three Amigos: a product owner, developer and tester -- is effective because of its collaborative nature. User stories are designed by a small team wherein each member has a defined role and brings their own perspective based on their area of expertise.
Agile coach John Ferguson Smart defined these roles based on their functions within the team. His take on a Three Amigos team labels one to request, one to suggest and one to protest. Usually, these roles correspond to the ones team members play within their group's Agile structure.
The product owner or business analyst brings forward the request, usually by presenting a problem in need of a solution. The developer then proposes possible solutions in the form of suggestions. The tester is the one to protest, asking what-if and other types of questions.
As the one to protest, the tester ensures that the user story includes all possible scenarios and concerns that might affect the solution design. This is a critical role. Anything that's missed at this stage could harm quality and velocity later in the Agile process.
Let's examine the crucial role of testing in the Three Amigos strategy. First, we need to understand the role of the protester and why the tester is uniquely qualified to play that most important role and then we consider how the tester executes the role and facilitates documentation of a well-designed user story.
How the tester questions, elicits and facilitates
Since they are used to asking questions, testers are the ideal people to take on the protester role. After all, when the tester lacks important information, then test cases, edge cases and negative test cases can be missed.
Not only does the tester excel at asking questions, but the questions the tester asks are specifically designed to elicit requirements. Testers' questions not only clarify business rules and requirements, but they can also improve the technical design and the development approach.
To identify business rules and requirements, testers often ask for examples. This technique is known as specification by example.
A retailer, for instance, might want to offer additional loyalty points for purchases made in its brick-and-mortar stores rather than on its website. The tester asks scenario-based questions that may include the following:
- How are the loyalty points calculated if an item is purchased online, returned and purchased again in the store?
- What loyalty points are applicable to items that are on sale?
- Can the additional loyalty points earned on in-store purchases be used toward purchases made online?
- Is there a limit to the amount of additional in-store loyalty points that can be earned per visit; if so, what is that limit?
The tester's questions focus not only on the business, but also on the technical requirements. Questions around technical requirements often involve integrations and nonfunctional requirements, such as performance and security. Using our example above, the tester may ask about how the loyalty points will be linked to the customers' accounts or how the loyalty points will appear on the store credit card statements.
These types of questions are then translated into requirements against which test cases are written. Testers often facilitate the documentation by incorporating techniques such as example mapping. In this technique, for each example, the business rules are listed in a flow chart format. User stories are developed from those flow charts.
How the Three Amigos approach facilitates software development
Using the Three Amigos technique, user stories quickly move through backlog refinement and are pulled into sprints during sprint planning. Test cases are developed to test the end-to-end flows, including the happy path and alternative paths, as well as negative tests and boundary test cases as needed. Developers use the insights learned from the Three Amigos sessions to develop code that meets all requirements and that gracefully handles edge-case scenarios.
The Three Amigos approach is one of the most effective quality engineering strategies that can be applied to Agile development. It is the ultimate shift-left tool, effectively preventing defects and increasing both quality and velocity.
In the role of the protester, testers play a critical part in the Three Amigos session. They use specification by example, i.e., asking scenario-based questions to elicit business and technical requirements and to facilitate the development of user stories via example mapping and other techniques.