Examining Acceptance Criteria Design
I've been drilling down on designing effective acceptance criteria. Currently, I'm analyzing the core topic, AC, and the key challenge: ensuring they align perfectly with both functional and non-functional requirements. I’m thinking about the most efficient way to deconstruct requests.
Considering Structuring the Guide
Now I'm focusing on structuring the guide itself. I've begun to outline sections: the introduction clarifying AC's purpose, a "Foundation" step detailing formats, and a step for functional alignment. I'm also grappling with the best way to integrate non-functional requirements.
Evaluating Non-Functional Integration
I'm now deep-diving into the trickiest aspect, how to integrate Non-Functional Requirements. I'm leaning toward illustrating the differences between AC and DoD. Thinking about how some NFRs are system-wide, and others are story-specific. My current thoughts are that "page load time" could be in DoD and "search results time" should be in specific AC.
Synthesizing Guide Content
I'm now iterating on the guide's content. I've focused on specific steps, with an emphasis on functional and non-functional requirements. I'm actively integrating Gherkin and bullet points to differentiate formats. I'm now crafting a detailed "Examples" section, with a Login scenario to test and illustrate each concept.
Structuring the Guide Iteration
I'm now focusing on solidifying the guide structure, expanding on the concepts. I'm finalizing Step 1, emphasizing the value of Gherkin and simple rule-based AC formats. I'm drafting the "Examples" section, using a Login scenario, to clearly illustrate how to incorporate both FR and NFR. I'm now also considering a section on common pitfalls.
Designing effective Acceptance Criteria (AC) requires a deliberate strategy to ensure that a feature not only works (Functional) but works well (Non-Functional).
Here is a comprehensive guide on how to design AC that bridges the gap between functional and non-functional requirements.
1. Choose the Right Format
Before writing content, establish a consistent format. The two most effective styles are:
- Scenario-Based (Gherkin): Best for complex logic and user flows.
- Structure: Given [context] → When [action] → Then [outcome].
- Rule-Based (Checklist): Best for design constraints and system behaviors.
- Structure: Bulleted list verifying specific conditions.
Recommendation: Use a hybrid approach. Use Gherkin for Functional paths and a Checklist for Non-Functional constraints.
2. The "Sandwich Strategy" for Alignment
To align FR and NFR, structure your AC into three distinct layers within a User Story (ticket).
Layer 1: Functional Scenarios (The Happy Path & Errors)
Focus on what the user does.
- Example: "Given the user is on the registration page, When they enter a valid email, Then the system sends a verification link."
Layer 2: Non-Functional Constraints (Specific to this story)
Focus on performance, security, or usability specific to this feature.
- Example: "The verification email must arrive within 60 seconds" (Performance).
- Example: "The password field must mask characters" (Security).
Layer 3: Cross-Functional Standards (Definition of Done)
Do not repeat global NFRs (like "Site must use HTTPS") in every ticket. Move these to the Definition of Done (DoD). Only include NFRs in the AC if they deviate from the standard or strictly pertain to that specific feature.
3. Designing Functional ACs
To ensure functional alignment, ensure your ACs cover the "Three Ps":
- Positive (Happy Path): Everything goes right.
- Negative (Sad Path): The user makes a mistake (e.g., invalid input).
- Permissive (Edge Cases): Boundary values (e.g., max character limits, empty states).
Tip: Don't describe the UI implementation (e.g., "Click the blue button"); describe the intent (e.g., "Submit the form"). This allows the design to change without invalidating the AC.
4. Designing Non-Functional ACs (The SMURFS approach)
Non-functional requirements are often vague words like "fast" or "secure." To align them with AC, you must quantify them using the SMURFS model within the ticket:
- Security: "Input fields must create an alert for SQL injection attempts."
- Maintainability: "Code must follow the 'Strategy Pattern' for the payment gateway."
- Usability: "The purchase flow requires no more than 3 clicks."
- Reliability: "If the API fails, cached data is displayed."
- Functionality (Performance): "Search results load in <200ms."
- Scalability: "Batch processing handles 10,000 records without timeout."
The Rule: If you can’t test it, it’s not an Acceptance Criterion. Never write "The page loads quickly." Write "The page loads under 2 seconds on 4G networks."
5. Real-World Example: "Reset Password" Feature
Here is how to design a single set of ACs that aligns both requirements.
User Story: As a user, I want to reset my password so I can regain access to my account.
Section A: Functional Criteria (Scenario-Based)
- Scenario 1: Successful Reset
- Given the user enters a registered email address
- When they click "Reset Password"
- Then they are redirected to a confirmation page
- And they receive an email with a reset link.
- Scenario 2: Unregistered Email
- Given the user enters an email not in the database
- When they click "Reset Password"
- Then the system displays a generic "If an account exists, an email has been sent" message (to prevent email harvesting).
Section B: Non-Functional Constraints (Rule-Based)
- Performance: The reset email must be triggered by the mail server within 5 seconds of the request.
- Security: The reset link must expire after 15 minutes.
- Security: The new password must enforce the complexity policy (High Strength: 12+ chars, special char, number).
- Accessibility: The email field must support screen readers with an
aria-label.
6. The Process: The "Three Amigos" Session
The biggest failure point in designing ACs is the Product Owner writing them in isolation. Shift to the Three Amigos model to ensure alignment:
- Product Owner represents Functionality: "Here is what the user needs."
- Developer represents Feasibility/NFRs: "To make that fast (NFR), we need to index the database. Let's add an AC for that."
- QA represents Edge Cases: "What happens if they click the button twice? Let's add an AC for button disabling."
Summary Checklist for Effective AC Design
- Is it Binary? (Pass/Fail – no "maybe").
- Is the NFR Specific? (Quantifiable metrics, not adjectives).
- Is the NFR Global or Local? (If Global, put in DoD; if Local, put in AC).
- Is it Independent? (Can be tested without dependence on other incomplete stories).
- Is it User-Focused? (Even NFRs should relate to the user experience, e.g., "User waits no longer than 2s," not "Database query runs efficiently").