Upload
excella-consulting
View
1.466
Download
1
Tags:
Embed Size (px)
DESCRIPTION
Agile Requirements are lightweight by design, so what can you do as the BA to convey requirements in a concise yet comprehensive way? How can you include real examples in your requirements to increase clarity and reduce ambiguity when working with your team? In this presentation, Rebecca Halstead shares how to incorporate examples in your requirements as a way to encourage collaboration and build a shared understanding about the acceptance criteria. Rebecca delivered this presentation on Agile Requirements at the International Institute of Business Analysis, DC Chapter meeting on March 20, 2014.
Citation preview
Agile RequirementsHow to Model Lightweight Requirements using Examples
1
Speaker Bio
2
• Excella Business Analysis Center of Excellence Lead
• CBAP, PMP, PMI-ACP, CSM, CSPO
• President of the IIBA DC Chapter
• Contact Information:– [email protected]– http://excella.com/people/rebecca-
halstead.aspx
3
• Specification by Example• Executable Specifications• Scenarios• Automated Acceptance Tests (AAT)• Behavior Driven Development (BDD)• Acceptance Test Driven Development
(AATDD)• Gherkin Syntax
Today’s Topic
Requirements using Examples
4
Tooling
Documentation
Collaboration
Three Elements of this Technique
5
Building in Quality
Plan Collaborate Deliver
Build the right thing
Build the thing right
6
Characteristics of “good” requirements
7
Communicating Requirements
8
Level of Documentation
9
• Using Examples:– Makes abstract
concepts more relatable
– Minimizes misinterpretation
– Highlights success, alternative and exception cases
How do you specify the right amount?
10
Optimism Bias
An Example of Using an Example…
12
Developing examples
1. Feature 2. User Story 3. Collaborate 4. Scenarios 5. Examples
13
How it all relates
14
Background:
You are developing an online ordering website for a local company that grows, harvests and sells botanicals directly to customers.
Feature: Calculate customer order
Feature 1. Feature 2. User Story 3. Collaborate 4. Scenarios 5. Examples
15
Calculate Order Feature
16
User Story:
As a customer, I want to review shipping costs in my shopping cart before checking out, so that I can see if I will receive free shipping.
User Story
Stakeholders can rank
Team can estimate
1. Feature 2. User Story 3. Collaborate 4. Scenarios 5. Examples
17
CollaborateHow do I describe what I want?
How do I validate that this work is done?
How do I code this
feature?
What are the details
of this feature?
1. Feature 2. User Story 3. Collaborate 4. Scenarios 5. Examples
18
What is Gherkin?
19
Scenario: Standard Shipping Rate
Given I am a customer
And my order amount is $49.99
When I view my cart
Then I see that shipping costs are $3.99
Scenarios 1. Feature 2. User Story 3. Collaborate 4. Scenarios 5. Examples
20
Scenario: Free Shipping Rate
Given I am a customer
And my order amount is $50.00
When I view my cart
Then I see no shipping costs
Scenarios 1. Feature 2. User Story 3. Collaborate 4. Scenarios 5. Examples
21
Scenario Outline: Shipping Rate
Given I am a customer
And my order amount is “<order_total>”
When I view my cart
Then I see the “<shipping_cost>”
Scenarios 1. Feature 2. User Story 3. Collaborate 4. Scenarios 5. Examples
22
Examples:
Examples
order_total shipping_cost
$12.79 $3.99
$49.99 $3.99
$50.00 $0.00
$250.00 $0.00
1. Feature 2. User Story 3. Collaborate 4. Scenarios 5. Examples
23
Alternate MethodStory As a customer, I want to review shipping costs in my shopping cart before
checking out, so that I can see if I will receive free shipping.Scenario Customer adds less than $50.00 worth of botanicals to his cart.
Business Rule Standard shipping for orders under $50.00 and free for orders over $50.00.
GIVEN
Precondition(s) Order amount: $49.99
Fixed Data Product Id: 12299Quantity: 3
WHEN
Action View cart
Input Data
THEN
Output Data Shipping cost = $3.99
Postcondition Shipping rate determined
Based on examples from: http://ebgconsulting.com
24
Feature: Application AccessScenario: User with valid credentials
Imperative (Narrative)GIVEN I am an unauthenticated userAND I am on the login pageAND I enter a valid name in the Name fieldAND I enter the corresponding password in the Password fieldWHEN I select the Login buttonTHEN I should see the welcome page
Imperative Style…
Implementation Detail – what if decide to use Token-based authentication or single sign-on?
UI Detail – what if the user interface changes and you select name from a drop-down list or select a radio button?
25
Feature: Application AccessScenario: User with valid credentials
Declarative (Informative)GIVEN I am an unauthenticated userAND I am on the login pageWHEN I submit valid credentialsTHEN I should see the welcome page
Declarative Style…
26
Feature: Application AccessScenario: User with valid credentials
Side-by-side Comparison
Imperative (Narrative) Declarative (Informative)
GIVEN I am an unauthenticated userAND I am on the login pageAND I enter a valid name in the Name fieldAND I enter the corresponding password in the Password fieldWHEN I select the Login buttonTHEN I should see the welcome page
GIVEN I am an unauthenticated userAND I am on the login page
WHEN I submit valid credentialsTHEN I should see the welcome page
27
—If the user interface is constantly changing, it is better to use imperative.
—Declarative is easier to maintain.
—Developers prefer the imperative style.
—If a stakeholder is concerned about the user’s interaction experience, use imperative.
—Declarative specifies implementation details.
Myth or Fact?
M
F?F
M
28
• Make each line of the acceptance criteria stand on its own
• Use active voice, not passive• Have a single action trigger the expected
behavior (WHEN condition)• Use parameters to allow concise
expression of examples
Guidelines
Exercise #1
30
Okay Example:GIVEN an active user with valid credentials and that user has previously submitted a ticketWHEN that user finds a previously submitted ticket in an active statusTHEN that user has the option of sending a message
Better Example:GIVEN I am an active user with valid credentialsAND I previously submitted a ticketAND the ticket is in an active statusWHEN I find a previously submitted ticketTHEN I should see an option for sending a message
Exercise #1, Scenario 1
31
Okay Example:GIVEN I am an unregistered userWHEN I enter username “jsmith” and password “secret123!”THEN I see a profile successfully created message on the Welcome page
Better Example:GIVEN I am an unregistered userWHEN I successfully create a user profileTHEN I see a profile successfully created message on the Welcome page
Exercise #1, Scenario 2
32
Okay Example:GIVEN I add three items costing $5.25 each to my shopping cartAND I am shipping to VAWHEN I view my shopping cartTHEN I see an order total of $20.69
Better Example:GIVEN I add these items to my shopping cart: | item_id | quantity | price | 10000 | 2 | $2.49 | 29901 | 1 | $11.98AND I am shipping to “<state>”WHEN I view my shopping cartTHEN I see an order total of “<order_total>”
Exercise #1, Scenario 3
Exercise #2
34
Exercise #2
Product Name: CoffeeSpot Mobile Application
Vision: The CoffeeSpot application allows customers to request a spot to decrease wait time at a specified location. It allows administrators to provide an alternate work location to the remote workforce while minimizing unclaimed inventory.
Personas Big Picture Product Details
Joe Cupps(Administrator)
Indicate Available
Spots
Show Available
Spots
Track Usage Details
Claim Spot
View Usage Details
Release Spot
Lisa Java(Customer)
To automate or not to automate…
36
INTEGRATION TESTSTests that verify integrated components or subsystems
UNIT TESTSTests that verify components in isolation
Test PyramidExploratory
Testing
Adapted from: https://www.ibm.com/developerworks/library/j-aopwork11/
37
• Consistency makes it easier to automate• BAs need to continue to own acceptance
tests• Involve developers early• Use a Gherkin editor• Automate an end-to-end user journey
Tips for Automation
38
• Automated acceptance tests does not mean no manual testing
• Business users find G-W-T difficult to understand
• No all Product Owners see the value in automation
• Factor in reduced team capacity due to instrumenting the tests
• Automate by user journeys• Provide BAs with a tool for maintaining
Lessons Learned
39
Books• Gojko Adzic, Specification by Example: How Successful Teams
Deliver the Right Software• Mario Cardinal, Executable Specifications with Scrum: A Practical
Guide to Agile Requirements Discovery
Blogs• http://ebgconsulting.com/blog• http://dannorth.net• http://watirmelon.com/• http://gojko.net/
Want to learn more?
40
Benefits of Failure:
http://www.ted.com/talks/tim_harford
Optimism Bias:
http://www.ted.com/talks/tali_sharot_the_optimism_bias
Gherkin Syntax:
http://docs.behat.org/guides/1.gherkin.html
http://www.concordion.org/Technique.html
Expert Panel:
http://www.infoq.com/articles/virtual-panel-bdd
More resources
41
• Advanced Certified Scrum Product Owner (CSPO) – Agile Business Analysis (BA) 3/31/14 9AM - 4/1/14 5PM– Discount Code: IIBADC
• Certified ScrumMaster (CSM) Training 4/23/14 9AM - 4/24/14 5PM
• Advanced Certified Scrum Product Owner (CSPO) 4/28/14 9AM - 4/29/14 5PM
For more details: http://www.eventbrite.com/o/excella-consulting-2232953017
Excella Agile Courses