SlideShare a Scribd company logo
1 of 12
1
Developing Stories
2
Stories are a means for Agile teams to take large concepts and progressively break
them down into finer grained units of value
MVP
Discovery
Feature
Testing
Intake Story
Dev
Story
Spec
Story
Testing
Feature
Sketch
Ideas Celebrate!
Opportunity
Minimum Viable Product
Feature
StoryStory
Acceptance
Criteria
Story Specification Scenarios
Story Specification Test Cases
Story
Mapping
FeatureTest
Cases
Shippable
MVP
3
Story Analysis
Story Engineering
Story Testing
MVP
Discovery
Feature
Sketching
Feature
Testing
Intake
MVP
Release
Weeks
Months
Stories are progressively refined through the agile feedback loop
4
Story Analysis
Story Engineering
Story Testing
MVP
Discovery
Feature
Sketching
Feature
Testing
Intake
MVP
Release
Weeks
Months (weeks?)
Given some condition
And another condition
When something happens
And something else happens
Then expected result
And another expected result
Opportunity
Canvas
Story Map
Story Sketch
Story Specification
Scenario
Story Specification
Test case
Impact Map
Stories are progressively refined through the agile feedback loop
5
Software
Specification
Software
Integration & Build
Software
Development
Story
Engineering
Story
Analysis
Story
Testing
Days
(Hours
/Minutes)
Weeks
Software
Refactoring
Software
Refactoring
Feature
Sketching
Feature
Testing
As delivery teams become comfortable with Agile delivery, they practice an inner
feedback loop focused on rapidly building and validating software many times per
day
6
Write (Failing) Story Specification
Days
Write (Failing) Unit
Test
Build Software
with
dependencies
mocked
Refactor
Software
Structure and
Design
Execute (Passing)
Story SpecificationCheck In and Test
All Stories In
Feature
hours
Advanced teams maximize feedback by delivering stories using a Test Driven
approach
7
Story: Trading Status Alert
As a Trader
I want to be alerted when stocks are traded a specific threshold
So that I can take the right action
Scenario: Trader is not alerted below threshold
Given a stock of symbol STK1
And a threshold of 10.0
When the stock is traded at 5.0
Then the alert status should be OFF
Scenario: Trader is alerted above threshold
Given a stock of symbol STK1
And a threshold of 10.0
When the stock is traded at 11.0
Then the alert status should be ON
Write (Failing) Story
Specification Test
Write (Failing) Unit
Test
Build Software
with
dependencies
mocked
Execute (Passing) Story
Specification
Each Story is defined by creating a Scenario Specification
8
Story: Trading Status Alert
As a Trader
I want to be alerted when stocks are traded a specific threshold
So that I can take the right action
Scenario: Trader is not alerted below threshold
Given a stock of symbol STK1
And a threshold of 10.0
When the stock is traded at 5.0
Then the alert status should be OFF
Scenario: Trader is alerted above threshold
Given a stock of symbol STK1
And a threshold of 10.0
When the stock is traded at 11.0
Then the alert status should be ON
Write (Failing) Story
Specification Test
Write (Failing) Unit
Test
Build Software
with
dependencies
mocked
Execute (Passing) Story
Specification
public class TraderSteps {
private Stock stock;
@Given("a stock of symbol $symbol and a threshold of $threshold")
public void aStock(String symbol, double threshold) {
stock = new Stock(symbol, threshold);
}
@When("the stock is traded at $price")
public void theStockIsTradedAt(double price) {
stock.tradeAt(price);
}
@Then("the alert status should be $status")
public void theAlertStatusShouldBe(String status) {
ensureThat(stock.getStatus().name(), equalTo(status));
}
}
http://jbehave.org/
Scenario Specifications are also created in code, often before a single line of story
code is written…
9
Write (Failing)
Unit Test
Build Software with
dependencies mocked
Specification: Describe Stock Threshold
Context: When a stock is traded below alert
threshold
• Stock alert status should be OFF
• an alert message is not sent to the message
trader queue
Context: When stock is traded above alert threshold
stock
• Alert status should be ON
• An alert is sent to trader message queue
Individual classes required to
realize a story are defined
according to a suite of Software
Specifications
10
Write (Failing)
Unit Test
Specification: Describe Stock Threshold
Context: When a stock is traded below alert
threshold
• Stock alert status should be OFF
• an alert message is not sent to the message
trader queue
Context: When stock is traded above alert threshold
stock
• Alert status should be ON
• An alert is sent to trader message queue
@RunWith(JDaveRunner.class)
public class StockThreshold extends Specification<Stack<?>> {
public class BelowAlertThreshold {
private Stock stock;
private const THRESHOLD =15.00
public Stock<String> create() {
stock = new Stock(new Alert(THRESHOLD));
stock.Sell(new Buyer(), THRESHOLD -1 )
return stack;
}
public void AlertStatusIsOff() {
specify(stock.Status, should.be(Status.OFF));
}
public void AlertMessageIsNotSentToTraderQueue() {
TraderMessageQueue queue = MessageQueueFactory.TraderAlertQueue();
specify(queue.Message.does.not.contain(
TraderMessageQueue.THRESHOLD_ALERT));
}
}
http://jdave.org/
Software Specs are written before the
story code, and used to guide the
design of code using an outside-in
approach (ie UI layer->domain-
>persistence/utility)
11
Build Software with
dependencies mocked
Refactor Software Structure
and Design
Specification: Describe Stock Threshold
Context: When a stock is traded below alert threshold
• Stock alert status should be OFF
• an alert message is not sent to the message trader queue
Context: When stock is traded above alert threshold stock
• Alert status should be ON
• An alert is sent to trader message queue
Pass
Pass
Pass
Fail
Fail
Pass
Fail
Software Specifications
are validated
automatically as code is
updated, providing
immediate feedback on
development activity
12
Build
Software with
dependencie
s mocked
Refactor
Software
Structure and
Design
Execute (Passing)
Story SpecificationCheck In and Test
All Stories In
Feature
Story: Trading Status Alert
As a Trader
I want to be alerted when stocks are traded a specific threshold
So that I can take the right action
Scenario: Trader is not alerted below threshold
Given a stock of symbol STK1
And a threshold of 10.0
When the stock is traded at 5.0
Then the alert status should be OFF
Scenario: Trader is alerted above threshold
Given a stock of symbol STK1
And a threshold of 10.0
When the stock is traded at 11.0
Then the alert status should be ON
Pass
Fail
Fail
Once all Software
Specifications for a Story
pass, the Story
Specification is run
(automatically) indicating
if user level acceptance
criteria are also passing

More Related Content

Similar to Developing stories

Declarative presentations UIKonf
Declarative presentations UIKonfDeclarative presentations UIKonf
Declarative presentations UIKonfNataliya Patsovska
 
The uniform interface is 42
The uniform interface is 42The uniform interface is 42
The uniform interface is 42Yevhen Bobrov
 
Cooking your Ravioli "al dente" with Hexagonal Architecture
Cooking your Ravioli "al dente" with Hexagonal ArchitectureCooking your Ravioli "al dente" with Hexagonal Architecture
Cooking your Ravioli "al dente" with Hexagonal ArchitectureJeroen Rosenberg
 
Ice mini guide
Ice mini guideIce mini guide
Ice mini guideAdy Liu
 
Taming Deployment With Smart Frog
Taming Deployment With Smart FrogTaming Deployment With Smart Frog
Taming Deployment With Smart FrogSteve Loughran
 
1. java script language fundamentals
1. java script language fundamentals1. java script language fundamentals
1. java script language fundamentalsRajiv Gupta
 
Behaviour Driven Development V 0.1
Behaviour Driven Development V 0.1Behaviour Driven Development V 0.1
Behaviour Driven Development V 0.1willmation
 
WSO2 Product Release Webinar: WSO2 Complex Event Processor 4.0
WSO2 Product Release Webinar: WSO2 Complex Event Processor 4.0WSO2 Product Release Webinar: WSO2 Complex Event Processor 4.0
WSO2 Product Release Webinar: WSO2 Complex Event Processor 4.0WSO2
 
Apex Enterprise Patterns: Building Strong Foundations
Apex Enterprise Patterns: Building Strong FoundationsApex Enterprise Patterns: Building Strong Foundations
Apex Enterprise Patterns: Building Strong FoundationsSalesforce Developers
 
How Scala promotes TDD
How Scala promotes TDDHow Scala promotes TDD
How Scala promotes TDDShai Yallin
 
From Query Plan to Query Performance: Supercharging your Apache Spark Queries...
From Query Plan to Query Performance: Supercharging your Apache Spark Queries...From Query Plan to Query Performance: Supercharging your Apache Spark Queries...
From Query Plan to Query Performance: Supercharging your Apache Spark Queries...Databricks
 
Concurrency, Scalability & Fault-tolerance 2.0 with Akka Actors & STM
Concurrency, Scalability & Fault-tolerance 2.0 with Akka Actors & STMConcurrency, Scalability & Fault-tolerance 2.0 with Akka Actors & STM
Concurrency, Scalability & Fault-tolerance 2.0 with Akka Actors & STMMario Fusco
 
eBay Pulsar: Real-time analytics platform
eBay Pulsar: Real-time analytics platformeBay Pulsar: Real-time analytics platform
eBay Pulsar: Real-time analytics platformKyoungMo Yang
 
Creating a Context-Aware solution, Complex Event Processing with FIWARE Perseo
Creating a Context-Aware solution, Complex Event Processing with FIWARE PerseoCreating a Context-Aware solution, Complex Event Processing with FIWARE Perseo
Creating a Context-Aware solution, Complex Event Processing with FIWARE PerseoFernando Lopez Aguilar
 
Code Generation for Azure with .net
Code Generation for Azure with .netCode Generation for Azure with .net
Code Generation for Azure with .netMarco Parenzan
 
Android Application Development - Level 3
Android Application Development - Level 3Android Application Development - Level 3
Android Application Development - Level 3Isham Rashik
 

Similar to Developing stories (20)

Bot builder v4 HOL
Bot builder v4 HOLBot builder v4 HOL
Bot builder v4 HOL
 
Declarative presentations UIKonf
Declarative presentations UIKonfDeclarative presentations UIKonf
Declarative presentations UIKonf
 
The uniform interface is 42
The uniform interface is 42The uniform interface is 42
The uniform interface is 42
 
Cooking your Ravioli "al dente" with Hexagonal Architecture
Cooking your Ravioli "al dente" with Hexagonal ArchitectureCooking your Ravioli "al dente" with Hexagonal Architecture
Cooking your Ravioli "al dente" with Hexagonal Architecture
 
Tdd iPhone For Dummies
Tdd iPhone For DummiesTdd iPhone For Dummies
Tdd iPhone For Dummies
 
Ice mini guide
Ice mini guideIce mini guide
Ice mini guide
 
Taming Deployment With Smart Frog
Taming Deployment With Smart FrogTaming Deployment With Smart Frog
Taming Deployment With Smart Frog
 
1. java script language fundamentals
1. java script language fundamentals1. java script language fundamentals
1. java script language fundamentals
 
Clean coding-practices
Clean coding-practicesClean coding-practices
Clean coding-practices
 
Behaviour Driven Development V 0.1
Behaviour Driven Development V 0.1Behaviour Driven Development V 0.1
Behaviour Driven Development V 0.1
 
WSO2 Product Release Webinar: WSO2 Complex Event Processor 4.0
WSO2 Product Release Webinar: WSO2 Complex Event Processor 4.0WSO2 Product Release Webinar: WSO2 Complex Event Processor 4.0
WSO2 Product Release Webinar: WSO2 Complex Event Processor 4.0
 
Apex Enterprise Patterns: Building Strong Foundations
Apex Enterprise Patterns: Building Strong FoundationsApex Enterprise Patterns: Building Strong Foundations
Apex Enterprise Patterns: Building Strong Foundations
 
How Scala promotes TDD
How Scala promotes TDDHow Scala promotes TDD
How Scala promotes TDD
 
Akka Testkit Patterns
Akka Testkit PatternsAkka Testkit Patterns
Akka Testkit Patterns
 
From Query Plan to Query Performance: Supercharging your Apache Spark Queries...
From Query Plan to Query Performance: Supercharging your Apache Spark Queries...From Query Plan to Query Performance: Supercharging your Apache Spark Queries...
From Query Plan to Query Performance: Supercharging your Apache Spark Queries...
 
Concurrency, Scalability & Fault-tolerance 2.0 with Akka Actors & STM
Concurrency, Scalability & Fault-tolerance 2.0 with Akka Actors & STMConcurrency, Scalability & Fault-tolerance 2.0 with Akka Actors & STM
Concurrency, Scalability & Fault-tolerance 2.0 with Akka Actors & STM
 
eBay Pulsar: Real-time analytics platform
eBay Pulsar: Real-time analytics platformeBay Pulsar: Real-time analytics platform
eBay Pulsar: Real-time analytics platform
 
Creating a Context-Aware solution, Complex Event Processing with FIWARE Perseo
Creating a Context-Aware solution, Complex Event Processing with FIWARE PerseoCreating a Context-Aware solution, Complex Event Processing with FIWARE Perseo
Creating a Context-Aware solution, Complex Event Processing with FIWARE Perseo
 
Code Generation for Azure with .net
Code Generation for Azure with .netCode Generation for Azure with .net
Code Generation for Azure with .net
 
Android Application Development - Level 3
Android Application Development - Level 3Android Application Development - Level 3
Android Application Development - Level 3
 

Recently uploaded

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 

Recently uploaded (20)

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 

Developing stories

  • 2. 2 Stories are a means for Agile teams to take large concepts and progressively break them down into finer grained units of value MVP Discovery Feature Testing Intake Story Dev Story Spec Story Testing Feature Sketch Ideas Celebrate! Opportunity Minimum Viable Product Feature StoryStory Acceptance Criteria Story Specification Scenarios Story Specification Test Cases Story Mapping FeatureTest Cases Shippable MVP
  • 3. 3 Story Analysis Story Engineering Story Testing MVP Discovery Feature Sketching Feature Testing Intake MVP Release Weeks Months Stories are progressively refined through the agile feedback loop
  • 4. 4 Story Analysis Story Engineering Story Testing MVP Discovery Feature Sketching Feature Testing Intake MVP Release Weeks Months (weeks?) Given some condition And another condition When something happens And something else happens Then expected result And another expected result Opportunity Canvas Story Map Story Sketch Story Specification Scenario Story Specification Test case Impact Map Stories are progressively refined through the agile feedback loop
  • 5. 5 Software Specification Software Integration & Build Software Development Story Engineering Story Analysis Story Testing Days (Hours /Minutes) Weeks Software Refactoring Software Refactoring Feature Sketching Feature Testing As delivery teams become comfortable with Agile delivery, they practice an inner feedback loop focused on rapidly building and validating software many times per day
  • 6. 6 Write (Failing) Story Specification Days Write (Failing) Unit Test Build Software with dependencies mocked Refactor Software Structure and Design Execute (Passing) Story SpecificationCheck In and Test All Stories In Feature hours Advanced teams maximize feedback by delivering stories using a Test Driven approach
  • 7. 7 Story: Trading Status Alert As a Trader I want to be alerted when stocks are traded a specific threshold So that I can take the right action Scenario: Trader is not alerted below threshold Given a stock of symbol STK1 And a threshold of 10.0 When the stock is traded at 5.0 Then the alert status should be OFF Scenario: Trader is alerted above threshold Given a stock of symbol STK1 And a threshold of 10.0 When the stock is traded at 11.0 Then the alert status should be ON Write (Failing) Story Specification Test Write (Failing) Unit Test Build Software with dependencies mocked Execute (Passing) Story Specification Each Story is defined by creating a Scenario Specification
  • 8. 8 Story: Trading Status Alert As a Trader I want to be alerted when stocks are traded a specific threshold So that I can take the right action Scenario: Trader is not alerted below threshold Given a stock of symbol STK1 And a threshold of 10.0 When the stock is traded at 5.0 Then the alert status should be OFF Scenario: Trader is alerted above threshold Given a stock of symbol STK1 And a threshold of 10.0 When the stock is traded at 11.0 Then the alert status should be ON Write (Failing) Story Specification Test Write (Failing) Unit Test Build Software with dependencies mocked Execute (Passing) Story Specification public class TraderSteps { private Stock stock; @Given("a stock of symbol $symbol and a threshold of $threshold") public void aStock(String symbol, double threshold) { stock = new Stock(symbol, threshold); } @When("the stock is traded at $price") public void theStockIsTradedAt(double price) { stock.tradeAt(price); } @Then("the alert status should be $status") public void theAlertStatusShouldBe(String status) { ensureThat(stock.getStatus().name(), equalTo(status)); } } http://jbehave.org/ Scenario Specifications are also created in code, often before a single line of story code is written…
  • 9. 9 Write (Failing) Unit Test Build Software with dependencies mocked Specification: Describe Stock Threshold Context: When a stock is traded below alert threshold • Stock alert status should be OFF • an alert message is not sent to the message trader queue Context: When stock is traded above alert threshold stock • Alert status should be ON • An alert is sent to trader message queue Individual classes required to realize a story are defined according to a suite of Software Specifications
  • 10. 10 Write (Failing) Unit Test Specification: Describe Stock Threshold Context: When a stock is traded below alert threshold • Stock alert status should be OFF • an alert message is not sent to the message trader queue Context: When stock is traded above alert threshold stock • Alert status should be ON • An alert is sent to trader message queue @RunWith(JDaveRunner.class) public class StockThreshold extends Specification<Stack<?>> { public class BelowAlertThreshold { private Stock stock; private const THRESHOLD =15.00 public Stock<String> create() { stock = new Stock(new Alert(THRESHOLD)); stock.Sell(new Buyer(), THRESHOLD -1 ) return stack; } public void AlertStatusIsOff() { specify(stock.Status, should.be(Status.OFF)); } public void AlertMessageIsNotSentToTraderQueue() { TraderMessageQueue queue = MessageQueueFactory.TraderAlertQueue(); specify(queue.Message.does.not.contain( TraderMessageQueue.THRESHOLD_ALERT)); } } http://jdave.org/ Software Specs are written before the story code, and used to guide the design of code using an outside-in approach (ie UI layer->domain- >persistence/utility)
  • 11. 11 Build Software with dependencies mocked Refactor Software Structure and Design Specification: Describe Stock Threshold Context: When a stock is traded below alert threshold • Stock alert status should be OFF • an alert message is not sent to the message trader queue Context: When stock is traded above alert threshold stock • Alert status should be ON • An alert is sent to trader message queue Pass Pass Pass Fail Fail Pass Fail Software Specifications are validated automatically as code is updated, providing immediate feedback on development activity
  • 12. 12 Build Software with dependencie s mocked Refactor Software Structure and Design Execute (Passing) Story SpecificationCheck In and Test All Stories In Feature Story: Trading Status Alert As a Trader I want to be alerted when stocks are traded a specific threshold So that I can take the right action Scenario: Trader is not alerted below threshold Given a stock of symbol STK1 And a threshold of 10.0 When the stock is traded at 5.0 Then the alert status should be OFF Scenario: Trader is alerted above threshold Given a stock of symbol STK1 And a threshold of 10.0 When the stock is traded at 11.0 Then the alert status should be ON Pass Fail Fail Once all Software Specifications for a Story pass, the Story Specification is run (automatically) indicating if user level acceptance criteria are also passing