1	
  
Traceability in an Agile

Federal Agency Context

	
  
Craeg Strong
CTO, Ariel Partners
October 21, 2014
Washington, DC
	
  
How	
  Much	
  Tes,ng	
  Is	
  Enough…	
  
When	
  it	
  Comes	
  to	
  Ma8ers	
  of	
  	
  
Life	
  and	
  Death?	
  
	
  
2	
  
So&ware	
  Development	
  since	
  1988	
  	
  
	
  
Large	
  Commercial	
  &	
  Government	
  Projects	
  
	
  
Turned	
  Around	
  Projects	
  With	
  Agile	
  
	
  
Apache	
  Ant	
  Open-­‐Source	
  Contributor	
  
	
  
New	
  York	
  &	
  Washington	
  DC	
  Area	
  
CTO,	
  Ariel	
  Partners	
  	
  
CSM,	
  CSP,	
  CSD,	
  CSPO,	
  PSM,	
  	
  
PMI-­‐ACP,	
  PMP	
  
	
  
www.arielpartners.com	
  
cstrong@arielpartners.com	
  
@ckstrong1	
  
Craeg	
  Strong	
  
©	
  Copyright	
  Ariel	
  Partners	
  2014	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  *sales@arielpartners.com	
  	
  ((646)	
  467-­‐7394	
  	
  
3	
  
Agenda	
  
1.  What	
  Requirements	
  Traceability	
  Is	
  
2.  Why	
  &	
  When	
  It	
  Is	
  Important	
  
3.  Some	
  Typical	
  Agile	
  PracZces	
  
4.  Why	
  They	
  Are	
  Insufficient	
  
5.  AlternaZve	
  Approach:	
  BDD/ATDD	
  With	
  SpecFlow	
  
6.  How/When/Who/Why	
  
7.  Solving	
  The	
  Problem	
  With	
  Agility	
  
8.  How	
  To	
  Get	
  There:	
  TransiZonal	
  Strategies	
  
©	
  Copyright	
  Ariel	
  Partners	
  2014	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  *sales@arielpartners.com	
  	
  ((646)	
  467-­‐7394	
  	
  
4	
  
Context	
  
Examples Use Microsoft technology
Equivalents Exist in Other Language Ecosystems (Java, LAMP)
q  Air traffic control
q  Loss reserve calculation for long-tail insurance
q  Threat evaluation for detainee at border crossing
q  Nuclear power plant control
q  Digitized forensic evidence match at murder trial
q  Trading risk circuit breaker for high frequency or options
trading
q  Resource allocation for disaster relief
Heavily	
  Regulated	
  Industries	
  
Mission-­‐CriZcal	
  Systems	
  
Life-­‐CriZcal	
  Systems	
  
Financial	
  Systems	
  
Legacy	
  Systems	
  Without	
  Automated	
  Tests	
  
©	
  Copyright	
  Ariel	
  Partners	
  2014	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  *sales@arielpartners.com	
  	
  ((646)	
  467-­‐7394	
  	
  
5	
  
What	
  Is	
  Requirements	
  Traceability?	
  
•  Inventory of all requirements
•  …traced to features implemented in the software,
•  …traced to test cases that cover the functionality
•  …with indicator for most recent pass/fail test status
Typical Artifact: Requirements Traceability Matrix (RTM)
System
shall…
Module
XYZ
Test
Case 123
©	
  Copyright	
  Ariel	
  Partners	
  2014	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  *sales@arielpartners.com	
  	
  ((646)	
  467-­‐7394	
  	
  
6	
  
Why	
  Is	
  Requirements	
  Traceability	
  
Important?	
  
Ø Thousands of complex features
Ø …developed over many years
Ø …by people who are no longer on the
program
Ø …few automated tests
Ø …a brittle code base
How can we know we have tested
everything?
©	
  Copyright	
  Ariel	
  Partners	
  2014	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  *sales@arielpartners.com	
  	
  ((646)	
  467-­‐7394	
  	
  
7	
  
Agile	
  Approach:	
  	
  
Automated	
  Unit	
  Tests	
  
q  One test generally tests one class
q  Written by developers
q  Intended to be run after every change
q  “Classic” unit tests: code only
q  xUnit extended family
q Database testing
q Graphical user interface (GUI)
testing
q Smoke testing
q Performance testing
©	
  Copyright	
  Ariel	
  Partners	
  2014	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  *sales@arielpartners.com	
  	
  ((646)	
  467-­‐7394	
  	
  
8	
  
Measuring	
  Unit	
  Test	
  Coverage	
  
q Measures how much of the codebase is covered
by at least one unit test
q Typical target number: 80%
©	
  Copyright	
  Ariel	
  Partners	
  2014	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  *sales@arielpartners.com	
  	
  ((646)	
  467-­‐7394	
  	
  
9	
  
LimitaZons	
  of	
  Unit	
  TesZng	
  
Difficulty Creating Unit Tests
q  Legacy projects may not have good automated test coverage
q  Code may not be built for testability
Only A Partial Solution
q  Non developers cannot understand unit tests
q  Coverage of code does not guarantee a feature works as needed
Build The Thing Right Build The Right Thing
GUI
UZliZes	
  
Security	
  /	
  
Logging	
  
Service	
  
Business	
  Logic	
  
GUI	
  Module	
   Database	
  
Server
Persistence	
  
Security	
  /	
  	
  
Logging	
  
UZliZes	
  
Service	
  
Business	
  Logic	
  
Feature
©	
  Copyright	
  Ariel	
  Partners	
  2014	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  *sales@arielpartners.com	
  	
  ((646)	
  467-­‐7394	
  	
  
10	
  
What	
  about	
  Test	
  Driven	
  Development	
  
(TDD)?	
  
Test Driven Development
q  A Design technique
q  Tests are written first in order to drive the design
q  Additional tests may be added later
Why Does It Work?
q  There are generally multiple valid ways to design a piece of code
q  Writing a test first tends to produce more testable, flexible and
modular design
More Typical Alternative
q  Tests written during/after code
q  May require more refactoring to achieve desired results
TDD: Good Practice; But Does Not Solve The Problem
©	
  Copyright	
  Ariel	
  Partners	
  2014	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  *sales@arielpartners.com	
  	
  ((646)	
  467-­‐7394	
  	
  
11	
  
SoluZon:	
  Behavior-­‐Driven	
  
Development	
  (BDD)	
  
q Different Process
q Different Participants
q Different Focus: Build The Right Thing
User
Story
#53
Acceptance
Criterion 1
Acceptance
Criterion 2
Acceptance
Criterion 3
Automated Acceptance Test
#53.1
Given a claim has been
reported…
When the claim is entered…
Then the system should return…
Also Known as Acceptance Test Driven Development (ATDD)
©	
  Copyright	
  Ariel	
  Partners	
  2014	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  *sales@arielpartners.com	
  	
  ((646)	
  467-­‐7394	
  	
  
12	
  
Feature	
  File	
  
BDD	
  With	
  SpecFlow	
  
1.	
  Write	
  
Feature	
  
Step	
  DefiniZons	
  
2.	
  Generate	
  
Template	
  
3.	
  
C
©	
  Copyright	
  Ariel	
  Partners	
  2014	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  *sales@arielpartners.com	
  	
  ((646)	
  467-­‐7394	
  	
  
13	
  
BDD	
  With	
  SpecFlow:	
  	
  
Roles	
  and	
  Tools	
  
Developer	
  
Tester	
  
Analyst	
  
Product	
  Owner	
  
Syntax	
  HighlighZng	
  Support	
  
Gherkin Plugin
Syntax	
  HighlighZng	
  Support	
  
Gherkin Plugin
PicklesDoc	
  
Document	
  GeneraZon	
  
CodedUI
GUI-­‐Level	
  AutomaZon	
  
Test	
  AutomaZon	
  Base	
  Fwk	
  
	
  	
  (or	
  Selenium)	
  
	
  	
  (or	
  MSTest)	
  
Three	
  Amigos	
  
Project	
  Portal/Wiki	
  
	
  
Given…	
  
When…	
  
Then…	
  
	
  
Given…	
  
When…	
  
Then…	
  
	
  
Whiteboard	
  
©	
  Copyright	
  Ariel	
  Partners	
  2014	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  *sales@arielpartners.com	
  	
  ((646)	
  467-­‐7394	
  	
  
14	
  
BDD	
  With	
  SpecFlow:	
  Process	
  
3.	
  Tester	
  
Completes	
  
“Happy	
  Path”	
  
Scenario	
  
Tester	
   	
  
Given…	
  
When…	
  
Then…	
  
5.	
  Developer	
  	
  
Implements	
  Code	
  
And	
  Test	
  Steps	
  
Developer	
   SpecFlow	
  Pair	
  
2.	
  Create	
  Dra&	
  
SpecificaZon	
  
During	
  MeeZng	
  
	
  
User	
  Story	
  240	
  -­‐	
  Acceptance	
  Criteria	
  
1)	
  XYZ	
  Field	
  should	
  be	
  read-­‐only	
  
2)	
  Total	
  should	
  match	
  999.99	
  
	
  
	
  
Scenario:	
  Ensure	
  XYZ	
  Field	
  is	
  
read-­‐only	
  when…	
  
Scenario:	
  Ensure	
  Total	
  is…	
  
Analyst	
  
1.	
  Three	
  Amigos	
  
Discuss	
  User	
  
Story	
  or	
  Bug	
  
Developer	
   Tester	
   Analyst	
  
PO	
  
@ignore	
  
Scenario	
  XYZ	
  
	
  	
  	
  	
  	
  Given…	
  
	
  	
  	
  	
  	
  When…	
  
	
  	
  	
  	
  	
  Then…	
  
4.	
  Developer	
  Adds	
  
Dra&	
  SpecificaZon	
  
To	
  TFS	
  
Developer	
  
Big?	
  Risky?	
  
Small?	
  
Fix	
  Now	
  
	
  
Technical	
  
Product	
  Backlog	
  
	
  
	
  User	
  Story	
  999	
  
Cleanup	
  XYZ….	
  
8.	
  Rework,	
  
Refactoring,	
  or	
  
Cleanup	
  
IdenZfied?	
  
7.	
  Review	
  	
  
Completed	
  
Test	
  
Developer	
   Tester	
   Analyst	
  
6.	
  Tester,	
  
Analyst	
  Add	
  
Addl	
  
Scenarios	
  
Given…	
  
When…	
  
Then…	
  
	
  
Given…	
  
When…	
  
Then…	
  
Analyst	
   Tester	
  
©	
  Copyright	
  Ariel	
  Partners	
  2014	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  *sales@arielpartners.com	
  	
  ((646)	
  467-­‐7394	
  	
  
15	
  
GeneraZng	
  DocumentaZon	
  From	
  
SpecificaZons	
  
q Pickles Report Generator
q Features organized In tree structure
q More sophisticated commercial options available
(SpecFlow+)
©	
  Copyright	
  Ariel	
  Partners	
  2014	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  *sales@arielpartners.com	
  	
  ((646)	
  467-­‐7394	
  	
  
16	
  
Organizing	
  Automated	
  Tests:	
  	
  
By	
  Type	
  
q Named after class
being tested
q Test project structure
mirrors source code
product structure
q Named after feature
q Test project structure
mirrors business
domain
Unit	
  Tests	
   Feature	
  Tests	
  
©	
  Copyright	
  Ariel	
  Partners	
  2014	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  *sales@arielpartners.com	
  	
  ((646)	
  467-­‐7394	
  	
  
17	
  
Organizing	
  Automated	
  Tests:	
  	
  
Filter	
  By	
  Category	
  
Category	
   ExecuAon	
  Speed	
   Dependencies	
   ExecuAon	
  Context	
  
@CI	
   Very	
  Fast	
   None:	
  Code	
  Only	
   Developer,	
  before	
  
every	
  check-­‐in	
  
@DB	
   Slower	
   Database	
  structure,	
  may	
  use	
  
pre-­‐set	
  test	
  data	
  
CI	
  Build	
  
@smoke	
   Slowest	
   Full	
  Running	
  System	
   Nightly	
  Build	
  
@CI	
  
Scenario:	
  Ensure	
  abc…	
  
	
  
@DB	
  
Scenario:	
  Ensure	
  xyz…	
  	
  
	
  
@smoke	
  
Scenario:	
  Ensure	
  123…	
  
q  Each individual test case is categorized
according to its dependencies
q  “Run All Tests” automatically runs the
correct set of tests depending on execution
context
©	
  Copyright	
  Ariel	
  Partners	
  2014	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  *sales@arielpartners.com	
  	
  ((646)	
  467-­‐7394	
  	
  
18	
  
	
  Organizing	
  Automated	
  Tests:	
  	
  
Test	
  Frameworks	
  
SpecFlow	
  tests	
  can	
  be	
  wri8en	
  at	
  different	
  levels	
  –	
  even	
  within	
  the	
  
same	
  feature	
  file	
  
Feature	
  File	
  
Unit!
!
CodedUI CodedUI
Step	
  DefiniZons	
  –	
  ImplementaZon	
  AlternaZves	
  
Gherkin	
  
©	
  Copyright	
  Ariel	
  Partners	
  2014	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  *sales@arielpartners.com	
  	
  ((646)	
  467-­‐7394	
  	
  
19	
  
Organizing	
  Automated	
  Tests:	
  
Examples	
  
Acceptance Criteria
1.  Confirm that a trade that would trigger margin call will require
secondary authorization protocol
2.  Confirm that a trader is not allowed to enter a quantity of
more than 50,000 shares for an options trade
3.  Confirm that an out of the money trade will be flagged
User Story #13628
Enforce Trade Limits
For Option Trades
Possible	
  Strategy	
   Why?	
  
CodedUI	
  Test	
  using	
  Moq	
   Specific	
  GUI	
  is	
  important	
  and	
  needs	
  to	
  be	
  tested	
  
NUnit	
  test,	
  no	
  DB	
   •  CalculaZon	
  is	
  most	
  important	
  asset	
  to	
  test,	
  GUI	
  may	
  
change	
  
•  Legacy	
  system	
  is	
  being	
  rewripen	
  and	
  replacement	
  
system	
  must	
  support	
  same	
  logic	
  
NUnit	
  Test	
  with	
  DB	
   •  Significant	
  base	
  data	
  setup	
  required,	
  mocking	
  is	
  not	
  
pracZcal	
  
•  Significant	
  logic	
  to	
  be	
  tested	
  in	
  the	
  persistence	
  layer	
  
CodedUI	
  Test	
  with	
  DB	
   Full-­‐stack	
  smoke	
  test	
  is	
  desired	
  (requires	
  more	
  
maintenance;	
  there	
  should	
  be	
  relaZvely	
  few	
  of	
  these)	
  
©	
  Copyright	
  Ariel	
  Partners	
  2014	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  *sales@arielpartners.com	
  	
  ((646)	
  467-­‐7394	
  	
  
20	
  
Extending	
  BDD	
  For	
  Traceability	
  
q Epics	
  Linked	
  to	
  User	
  Stories	
  in	
  TFS	
  
q SpecFlow	
  Tests	
  Map	
  To	
  User	
  Stories	
  
User Story 1098 Feature: 1098
Scenario: XYZ
Scenario: ABC
Epic 1608
User Story 2689
User Story 3104
User Story 7510
Epic 2387
User Story 7513
Feature: 2689
Scenario: XYZ
Scenario: ABC
Feature: 3104
Scenario: XYZ
Scenario: ABC
Feature: 7510
Scenario: XYZ
Scenario: ABC
Feature: 7513
Scenario: XYZ
Scenario: ABC
Pros	
  
1.  Simple
2.  Easy to track
Cons	
  
1.  User story abstraction does not really
match feature
2.  Requires maintenance
©	
  Copyright	
  Ariel	
  Partners	
  2014	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  *sales@arielpartners.com	
  	
  ((646)	
  467-­‐7394	
  	
  
21	
  
Challenges	
  for	
  Maintaining	
  Traceability	
  
Issues
1.  A user story may describe only part of a true business
feature
2.  Later user stories may modify, contradict, or replace earlier
user stories
Mitigation: Let the tests help
1.  A failing SpecFlow test may indicate an older specification
needs maintenance
2.  If the earlier SpecFlow test does not fail, consider whether it
is really important to update an earlier user story with new
information
User	
  Stories	
  are	
  designed	
  to	
  be	
  ephemeral	
  –	
  only	
  ac,ve	
  within	
  their	
  Sprint	
  or	
  Release	
  
©	
  Copyright	
  Ariel	
  Partners	
  2014	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  *sales@arielpartners.com	
  	
  ((646)	
  467-­‐7394	
  	
  
22	
  
The	
  Agile	
  RTM	
  
q  All system functions expressed as user stories
q  All user stories have acceptance criteria
q  Each criterion translated to an automated test using structured
English (Gherkin)
q  Customized report matches epics and user stories to automated
acceptance tests
q  Test fails unless software is implemented correctly
Links	
  to	
  Theme	
  
Record	
  in	
  TFS	
  
Links	
  to	
  Epic	
  
Record	
  in	
  TFS	
  
Links	
  to	
  User	
  
Story	
  in	
  TFS	
  
Links	
  to	
  Feature	
  
DocumentaZon	
  
Generated	
  via	
  Pickles	
  
©	
  Copyright	
  Ariel	
  Partners	
  2014	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  *sales@arielpartners.com	
  	
  ((646)	
  467-­‐7394	
  	
  
23	
  
GeneraZng	
  the	
  Agile	
  RTM	
  
TFS	
  
Build	
  
PowerShell	
  Script	
  
TFS	
  
Themes,	
  Epics,	
  	
  
User	
  Stories	
  
Console	
  Runner	
  
Results	
  of	
  
Automated	
  Tests	
  
PicklesDoc	
  
Document	
  GeneraZon	
  
SpecificaZons	
  
Agile	
  RTM	
   Project	
  Portal	
  /	
  Wiki	
  Combine	
  &	
  Transform	
  
XML	
  Files	
  
Publish	
  
©	
  Copyright	
  Ariel	
  Partners	
  2014	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  *sales@arielpartners.com	
  	
  ((646)	
  467-­‐7394	
  	
  
24	
  
Building	
  A	
  Test	
  AutomaZon	
  Capability	
  
BUILD TESTING CAPABILITY
q  Technical Frameworks
q  NUnit
q  SpecFlow
q  Moq
q  Reporting Capability
q  Test Results
q  Code Coverage
q  Functional Coverage
q  Encouraging Adoption
q  Examples Everywhere
q  Mentoring
q  Pair Programming
MAKE THE SYSTEM TESTABLE
q  Upgrade dot net framework
q  Drop support for old
operating systems
q  Upgrade third party libraries
q  Refactor code to isolate
dependencies
q  Simplify project structure
q  Different components may
need different strategies
Both Pieces Are Required For Success
©	
  Copyright	
  Ariel	
  Partners	
  2014	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  *sales@arielpartners.com	
  	
  ((646)	
  467-­‐7394	
  	
  
25	
  
TransiZonal	
  Strategy:	
  
StarZng	
  with	
  Manual	
  Test	
  Cases	
  
Epic
Manual
TestCase
Manual
TestCase
Manual
TestCaseUser
Story
Manual
TestCase
Legacy
Req
Legacy
Req
q  Import legacy requirements
into TFS
q  Convert high-level
requirements into epics
q  Capture manual test cases
in MTM
q  Link MTM test cases to their
requirements and/or epics
q  Capture all new work using
user stories
q  Link legacy system
requirements to epics
alongside new user stories
Epic
Legacy
Req
Legacy
Req
Gradually migrate legacy
“Shall” requirements to user
stories and acceptance criteria
Plan
©	
  Copyright	
  Ariel	
  Partners	
  2014	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  *sales@arielpartners.com	
  	
  ((646)	
  467-­‐7394	
  	
  
26	
  
ConverZng	
  From	
  Requirements	
  to	
  
User	
  Stories	
  
Why	
  do	
  this?	
  
q System	
  has	
  long	
  projected	
  lifespan	
  
q Planned	
  re-­‐plarorm,	
  migraZon,	
  upgrade,	
  or	
  
significant	
  redevelopment	
  
	
  
User
Story
Legacy
Req 1	
  to	
  1	
  
Legacy
Req Acceptance Criterion
1	
  to	
  1	
  
User
Story
Legacy
Req 1	
  to	
  many	
  
User
Story
User
Story
Legacy
Req
User
Storymany	
  to	
  1	
  
Legacy
Req
Legacy
Req
©	
  Copyright	
  Ariel	
  Partners	
  2014	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  *sales@arielpartners.com	
  	
  ((646)	
  467-­‐7394	
  	
  
27	
  
Legacy	
  System	
  Replacement	
  
Benefits	
  of	
  SpecFlow	
  for	
  re-­‐development	
  
q SpecificaZons	
  confirm	
  new	
  system	
  meets	
  requirements	
  
q SpecificaZons	
  represent	
  up	
  to	
  half	
  of	
  overall	
  effort	
  
q SpecificaZons	
  provide	
  documentaZon	
  for	
  the	
  new	
  system	
  
q Highlights	
  areas	
  where	
  new	
  system	
  differs	
  from	
  old	
  system	
  
q Significantly	
  reduces	
  risk	
  
Legacy System
Replacement System
Significant	
  
Reuse	
  
Gherkin	
  
SpecificaZons	
  
Step	
  DefiniZons	
  
©	
  Copyright	
  Ariel	
  Partners	
  2014	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  *sales@arielpartners.com	
  	
  ((646)	
  467-­‐7394	
  	
  
28	
  
Summary	
  
1.  Traceability	
  is	
  important	
  for	
  mission	
  criZcal	
  
and	
  life	
  criZcal	
  so&ware	
  
2.  Automated	
  test	
  frameworks	
  can	
  provide	
  the	
  
assurance	
  we	
  need	
  
ü Did	
  we	
  build	
  the	
  right	
  thing	
  
ü Did	
  we	
  build	
  it	
  right	
  
ü Are	
  all	
  the	
  required	
  funcZons	
  working	
  correctly	
  
3.  SpecFlow	
  has	
  been	
  proven	
  effecZve	
  	
  
©	
  Copyright	
  Ariel	
  Partners	
  2014	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  *sales@arielpartners.com	
  	
  ((646)	
  467-­‐7394	
  	
  
29	
  
QuesZons?	
  
©	
  Copyright	
  Ariel	
  Partners	
  2014	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  *sales@arielpartners.com	
  	
  ((646)	
  467-­‐7394	
  	
  
We	
  are	
  available	
  for	
  consulZng	
  or	
  Agile	
  coaching.	
  
Feel	
  free	
  to	
  contact	
  us!	
  
Ariel	
  Partners	
  
(646)	
  467-­‐7394	
  
sales@arielpartners.com	
  
www.arielpartners.com	
  
@arielpartners	
  
	
  
Thank	
  You!	
  

More Related Content

PDF
20161024 Agile DC 2016 Conf Behavior Driven Development Workshop
PPSX
20191114 Agile Day NYC Conf Now You See It! Observing Flow Using Kanban Boards
PPTX
Babok overall chp2~7 slideshare
PPTX
2013 dep teaser
PDF
Enterprise graph applications
DOCX
Kulmani
PPTX
05Nov13 Webinar: Introducing Revolution R Enterprise 7 - The Big Data Big Ana...
PDF
Testing and Measurement in DevOps: Find Solutions—Not More Problems
20161024 Agile DC 2016 Conf Behavior Driven Development Workshop
20191114 Agile Day NYC Conf Now You See It! Observing Flow Using Kanban Boards
Babok overall chp2~7 slideshare
2013 dep teaser
Enterprise graph applications
Kulmani
05Nov13 Webinar: Introducing Revolution R Enterprise 7 - The Big Data Big Ana...
Testing and Measurement in DevOps: Find Solutions—Not More Problems

What's hot (20)

PDF
Collaboration Tools to Help Improve Documentation Process
PDF
CA Project and Portfolio Management v14.x - Building a Better Portfolio
PDF
rpastage
PPTX
The HANA Cloud Platform
PPTX
Expedite Enterprise Software Development with JIRA®, TeamForge® SCM, and Jenkins
PDF
Hands-On Lab: Let's Build an ITSM Dashboard
PPTX
Inflectra User Summit in Mannheim, Germany
PDF
The Graph-Native Advantage
PDF
Create Great Quarterly Plans While Eliminating Planning Waste
PDF
Sneak Peak into Self-Service, Cross-Enterprise, Job Scheduling with CA Worklo...
PDF
Delivering Exceptional Customer Experiences from the Cloud
PDF
Tech Talk: Master Your Continuous Delivery Pipeline with a New Level of Orche...
PPTX
How automate your SAP PI/PO/CPI and API management processes
PDF
CA Performance Manager Agility by using Docker Containers for Network Manag...
PDF
Automated Reporting Director
PDF
Kong Summit 2021 - Opening Keynote
DOC
Viswanathan CV
PPTX
JavaScript: Why Should I Care?
PPTX
A Portfolio of Opportunities, Johan Oskarsson - Knowit
PDF
Case Study: Tableau Integration with CA Project & Portfolio Management
Collaboration Tools to Help Improve Documentation Process
CA Project and Portfolio Management v14.x - Building a Better Portfolio
rpastage
The HANA Cloud Platform
Expedite Enterprise Software Development with JIRA®, TeamForge® SCM, and Jenkins
Hands-On Lab: Let's Build an ITSM Dashboard
Inflectra User Summit in Mannheim, Germany
The Graph-Native Advantage
Create Great Quarterly Plans While Eliminating Planning Waste
Sneak Peak into Self-Service, Cross-Enterprise, Job Scheduling with CA Worklo...
Delivering Exceptional Customer Experiences from the Cloud
Tech Talk: Master Your Continuous Delivery Pipeline with a New Level of Orche...
How automate your SAP PI/PO/CPI and API management processes
CA Performance Manager Agility by using Docker Containers for Network Manag...
Automated Reporting Director
Kong Summit 2021 - Opening Keynote
Viswanathan CV
JavaScript: Why Should I Care?
A Portfolio of Opportunities, Johan Oskarsson - Knowit
Case Study: Tableau Integration with CA Project & Portfolio Management
Ad

Viewers also liked (20)

PPTX
DOES14 - Jonny Wooldridge - The Cambridge Satchel Company - 10 Enterprise Tip...
PDF
Jvm-bdd-quality-driven
KEY
BDD for Rails Legacy Code
PPTX
Agile Tour Pune 2015:Test automation using BDD - Anita Pol and Sachin Salvekar
PPT
Introducing bdd elements to unit testing.pptx
PDF
ATAAS 2016 - Amol pradhan - Bridging the gap between business and technology ...
PDF
Bdd for legacy system
PDF
Impact Map Your Project
PDF
Object-Oriented BDD w/ Cucumber by Matt van Horn
PDF
10 things about BDD, Cucumber and SpecFlow - Long Version 2016
ODP
Mock Aren't Stub 讀後心得
PDF
BDD and Test Automation in Evalutionary Product Suite
PDF
BDD com Cucumber
PDF
Impact Maps/Story Maps - liefern was wirklich zählt
PDF
Upcoming events 2017
PDF
Scaffolding a legacy app with BDD scenarios using SpecFlow/Cucumber (BDD Lond...
PDF
Moving away from legacy code (AgileCymru)
PDF
Help! My Legacy Application is Unmaintainable!
PDF
Impact Mapping with Innovation Games (R)
PDF
Cross mobile testautomation mit Xamarin & SpecFlow
DOES14 - Jonny Wooldridge - The Cambridge Satchel Company - 10 Enterprise Tip...
Jvm-bdd-quality-driven
BDD for Rails Legacy Code
Agile Tour Pune 2015:Test automation using BDD - Anita Pol and Sachin Salvekar
Introducing bdd elements to unit testing.pptx
ATAAS 2016 - Amol pradhan - Bridging the gap between business and technology ...
Bdd for legacy system
Impact Map Your Project
Object-Oriented BDD w/ Cucumber by Matt van Horn
10 things about BDD, Cucumber and SpecFlow - Long Version 2016
Mock Aren't Stub 讀後心得
BDD and Test Automation in Evalutionary Product Suite
BDD com Cucumber
Impact Maps/Story Maps - liefern was wirklich zählt
Upcoming events 2017
Scaffolding a legacy app with BDD scenarios using SpecFlow/Cucumber (BDD Lond...
Moving away from legacy code (AgileCymru)
Help! My Legacy Application is Unmaintainable!
Impact Mapping with Innovation Games (R)
Cross mobile testautomation mit Xamarin & SpecFlow
Ad

Similar to 20141024 AgileDC 2014 Conf How much testing is enough for software that can condemn a man to death? Traceability in an Agile criminal justice context (20)

PDF
Atdd half day_new_1_up
PDF
SbE - Requirements in an agile process
PDF
BDD & Behat for Srijan Technologies
PPTX
Introduction to Testing and TDD
PDF
Specification-By-Example with Gherkin
PPTX
Gredy - test automation management and team collaboration
PDF
Functional testing patterns
PDF
Software Quality and Test Strategies for Ruby and Rails Applications
PDF
Specification-By-Example with Gherkin
PPT
Learn software testing with tech partnerz 3
PDF
What CS Class Didn't Teach About Testing
PPTX
Implementing Test Automation in Agile Projects
PDF
Acceptance Test Driven Development at StarWest 2014
PPT
Automated testing overview
PDF
Ta3s company overview
PDF
Digital Assurance Center of Excellence
PDF
BDD & Behat for Glasgow PHP
PDF
BDD & Behat
PDF
Model-based Testing: Taking BDD/ATDD to the Next Level
PPTX
ATDD in practice
Atdd half day_new_1_up
SbE - Requirements in an agile process
BDD & Behat for Srijan Technologies
Introduction to Testing and TDD
Specification-By-Example with Gherkin
Gredy - test automation management and team collaboration
Functional testing patterns
Software Quality and Test Strategies for Ruby and Rails Applications
Specification-By-Example with Gherkin
Learn software testing with tech partnerz 3
What CS Class Didn't Teach About Testing
Implementing Test Automation in Agile Projects
Acceptance Test Driven Development at StarWest 2014
Automated testing overview
Ta3s company overview
Digital Assurance Center of Excellence
BDD & Behat for Glasgow PHP
BDD & Behat
Model-based Testing: Taking BDD/ATDD to the Next Level
ATDD in practice

More from Craeg Strong (20)

PDF
20241008 Planview Project to Product: Business Agility With Flight Levels
PDF
20241009 JAX 2024 Putting Sec in DevSecOps for an AWS Lambda Based System
PDF
20240418 Flight Levels Day 2024 Flight Levels and Project and Portfolio Manag...
PDF
20231019 Flight Levels Bosch Engagement Day 2023 Business Agility With Flight...
PDF
RESPONSIVE TRAINING FOR DIGITAL TRANSFORMATIONS
PDF
20230829 DAFITC 2023 Agile For Leaders And Executives
PDF
20231004 JiraCon Team Spaces In Confluence
PDF
20231023 AgileDC Making Strategy Real with Well Crafted Outcomes
PDF
20230829 DAFITC 2023 Agile For Leaders And Executives
PPTX
20230622 PMINYC Modern Project Management with Lean Kanban
PDF
20230622 PMIC Leveraging the 4 Disciplines of Execution & Enterprise Kanban t...
PDF
ADDO 2022 Putting the Sec in DevSecOps for an AWS Lambda Based System
PDF
Coaching leaders: how to get it right, and how to get it really, really wrong
PDF
20220607 Introduction to Flight Levels
PDF
20220824 Kanban Global Summit 2022 Now You See It! Observing Flow Using [ONLI...
PDF
20220621 Project Management Innovation Conference Harrisburg PA Seatbelts and...
PDF
20220216 Lean In Government Conference Harrisburg PA Agile Tool Clash of the ...
PDF
20220329 Ariel Partners Configuring Jira For Maximum Agility
PDF
20220301 Atlassian Team Tour Government ArielPartners Innovative Jira Configu...
PDF
20211202 North America DevOps Group NADOG Adapting to Covid With Serverless C...
20241008 Planview Project to Product: Business Agility With Flight Levels
20241009 JAX 2024 Putting Sec in DevSecOps for an AWS Lambda Based System
20240418 Flight Levels Day 2024 Flight Levels and Project and Portfolio Manag...
20231019 Flight Levels Bosch Engagement Day 2023 Business Agility With Flight...
RESPONSIVE TRAINING FOR DIGITAL TRANSFORMATIONS
20230829 DAFITC 2023 Agile For Leaders And Executives
20231004 JiraCon Team Spaces In Confluence
20231023 AgileDC Making Strategy Real with Well Crafted Outcomes
20230829 DAFITC 2023 Agile For Leaders And Executives
20230622 PMINYC Modern Project Management with Lean Kanban
20230622 PMIC Leveraging the 4 Disciplines of Execution & Enterprise Kanban t...
ADDO 2022 Putting the Sec in DevSecOps for an AWS Lambda Based System
Coaching leaders: how to get it right, and how to get it really, really wrong
20220607 Introduction to Flight Levels
20220824 Kanban Global Summit 2022 Now You See It! Observing Flow Using [ONLI...
20220621 Project Management Innovation Conference Harrisburg PA Seatbelts and...
20220216 Lean In Government Conference Harrisburg PA Agile Tool Clash of the ...
20220329 Ariel Partners Configuring Jira For Maximum Agility
20220301 Atlassian Team Tour Government ArielPartners Innovative Jira Configu...
20211202 North America DevOps Group NADOG Adapting to Covid With Serverless C...

Recently uploaded (20)

PDF
NewMind AI Weekly Chronicles – August ’25 Week IV
PDF
giants, standing on the shoulders of - by Daniel Stenberg
PDF
Transform-Your-Factory-with-AI-Driven-Quality-Engineering.pdf
PDF
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
PDF
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
PDF
STKI Israel Market Study 2025 version august
PDF
Consumable AI The What, Why & How for Small Teams.pdf
PDF
4 layer Arch & Reference Arch of IoT.pdf
PDF
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PPT
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
PPTX
Build Your First AI Agent with UiPath.pptx
PPTX
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
PDF
Five Habits of High-Impact Board Members
PPTX
Microsoft Excel 365/2024 Beginner's training
PPTX
Training Program for knowledge in solar cell and solar industry
DOCX
search engine optimization ppt fir known well about this
PDF
Early detection and classification of bone marrow changes in lumbar vertebrae...
PDF
Convolutional neural network based encoder-decoder for efficient real-time ob...
PDF
UiPath Agentic Automation session 1: RPA to Agents
NewMind AI Weekly Chronicles – August ’25 Week IV
giants, standing on the shoulders of - by Daniel Stenberg
Transform-Your-Factory-with-AI-Driven-Quality-Engineering.pdf
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
STKI Israel Market Study 2025 version august
Consumable AI The What, Why & How for Small Teams.pdf
4 layer Arch & Reference Arch of IoT.pdf
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
Build Your First AI Agent with UiPath.pptx
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
Five Habits of High-Impact Board Members
Microsoft Excel 365/2024 Beginner's training
Training Program for knowledge in solar cell and solar industry
search engine optimization ppt fir known well about this
Early detection and classification of bone marrow changes in lumbar vertebrae...
Convolutional neural network based encoder-decoder for efficient real-time ob...
UiPath Agentic Automation session 1: RPA to Agents

20141024 AgileDC 2014 Conf How much testing is enough for software that can condemn a man to death? Traceability in an Agile criminal justice context

  • 1. 1   Traceability in an Agile
 Federal Agency Context
   Craeg Strong CTO, Ariel Partners October 21, 2014 Washington, DC   How  Much  Tes,ng  Is  Enough…   When  it  Comes  to  Ma8ers  of     Life  and  Death?    
  • 2. 2   So&ware  Development  since  1988       Large  Commercial  &  Government  Projects     Turned  Around  Projects  With  Agile     Apache  Ant  Open-­‐Source  Contributor     New  York  &  Washington  DC  Area   CTO,  Ariel  Partners     CSM,  CSP,  CSD,  CSPO,  PSM,     PMI-­‐ACP,  PMP     www.arielpartners.com   [email protected]   @ckstrong1   Craeg  Strong   ©  Copyright  Ariel  Partners  2014                                  *[email protected]    ((646)  467-­‐7394    
  • 3. 3   Agenda   1.  What  Requirements  Traceability  Is   2.  Why  &  When  It  Is  Important   3.  Some  Typical  Agile  PracZces   4.  Why  They  Are  Insufficient   5.  AlternaZve  Approach:  BDD/ATDD  With  SpecFlow   6.  How/When/Who/Why   7.  Solving  The  Problem  With  Agility   8.  How  To  Get  There:  TransiZonal  Strategies   ©  Copyright  Ariel  Partners  2014                                  *[email protected]    ((646)  467-­‐7394    
  • 4. 4   Context   Examples Use Microsoft technology Equivalents Exist in Other Language Ecosystems (Java, LAMP) q  Air traffic control q  Loss reserve calculation for long-tail insurance q  Threat evaluation for detainee at border crossing q  Nuclear power plant control q  Digitized forensic evidence match at murder trial q  Trading risk circuit breaker for high frequency or options trading q  Resource allocation for disaster relief Heavily  Regulated  Industries   Mission-­‐CriZcal  Systems   Life-­‐CriZcal  Systems   Financial  Systems   Legacy  Systems  Without  Automated  Tests   ©  Copyright  Ariel  Partners  2014                                  *[email protected]    ((646)  467-­‐7394    
  • 5. 5   What  Is  Requirements  Traceability?   •  Inventory of all requirements •  …traced to features implemented in the software, •  …traced to test cases that cover the functionality •  …with indicator for most recent pass/fail test status Typical Artifact: Requirements Traceability Matrix (RTM) System shall… Module XYZ Test Case 123 ©  Copyright  Ariel  Partners  2014                                  *[email protected]    ((646)  467-­‐7394    
  • 6. 6   Why  Is  Requirements  Traceability   Important?   Ø Thousands of complex features Ø …developed over many years Ø …by people who are no longer on the program Ø …few automated tests Ø …a brittle code base How can we know we have tested everything? ©  Copyright  Ariel  Partners  2014                                  *[email protected]    ((646)  467-­‐7394    
  • 7. 7   Agile  Approach:     Automated  Unit  Tests   q  One test generally tests one class q  Written by developers q  Intended to be run after every change q  “Classic” unit tests: code only q  xUnit extended family q Database testing q Graphical user interface (GUI) testing q Smoke testing q Performance testing ©  Copyright  Ariel  Partners  2014                                  *[email protected]    ((646)  467-­‐7394    
  • 8. 8   Measuring  Unit  Test  Coverage   q Measures how much of the codebase is covered by at least one unit test q Typical target number: 80% ©  Copyright  Ariel  Partners  2014                                  *[email protected]    ((646)  467-­‐7394    
  • 9. 9   LimitaZons  of  Unit  TesZng   Difficulty Creating Unit Tests q  Legacy projects may not have good automated test coverage q  Code may not be built for testability Only A Partial Solution q  Non developers cannot understand unit tests q  Coverage of code does not guarantee a feature works as needed Build The Thing Right Build The Right Thing GUI UZliZes   Security  /   Logging   Service   Business  Logic   GUI  Module   Database   Server Persistence   Security  /     Logging   UZliZes   Service   Business  Logic   Feature ©  Copyright  Ariel  Partners  2014                                  *[email protected]    ((646)  467-­‐7394    
  • 10. 10   What  about  Test  Driven  Development   (TDD)?   Test Driven Development q  A Design technique q  Tests are written first in order to drive the design q  Additional tests may be added later Why Does It Work? q  There are generally multiple valid ways to design a piece of code q  Writing a test first tends to produce more testable, flexible and modular design More Typical Alternative q  Tests written during/after code q  May require more refactoring to achieve desired results TDD: Good Practice; But Does Not Solve The Problem ©  Copyright  Ariel  Partners  2014                                  *[email protected]    ((646)  467-­‐7394    
  • 11. 11   SoluZon:  Behavior-­‐Driven   Development  (BDD)   q Different Process q Different Participants q Different Focus: Build The Right Thing User Story #53 Acceptance Criterion 1 Acceptance Criterion 2 Acceptance Criterion 3 Automated Acceptance Test #53.1 Given a claim has been reported… When the claim is entered… Then the system should return… Also Known as Acceptance Test Driven Development (ATDD) ©  Copyright  Ariel  Partners  2014                                  *[email protected]    ((646)  467-­‐7394    
  • 12. 12   Feature  File   BDD  With  SpecFlow   1.  Write   Feature   Step  DefiniZons   2.  Generate   Template   3.   C ©  Copyright  Ariel  Partners  2014                                  *[email protected]    ((646)  467-­‐7394    
  • 13. 13   BDD  With  SpecFlow:     Roles  and  Tools   Developer   Tester   Analyst   Product  Owner   Syntax  HighlighZng  Support   Gherkin Plugin Syntax  HighlighZng  Support   Gherkin Plugin PicklesDoc   Document  GeneraZon   CodedUI GUI-­‐Level  AutomaZon   Test  AutomaZon  Base  Fwk      (or  Selenium)      (or  MSTest)   Three  Amigos   Project  Portal/Wiki     Given…   When…   Then…     Given…   When…   Then…     Whiteboard   ©  Copyright  Ariel  Partners  2014                                  *[email protected]    ((646)  467-­‐7394    
  • 14. 14   BDD  With  SpecFlow:  Process   3.  Tester   Completes   “Happy  Path”   Scenario   Tester     Given…   When…   Then…   5.  Developer     Implements  Code   And  Test  Steps   Developer   SpecFlow  Pair   2.  Create  Dra&   SpecificaZon   During  MeeZng     User  Story  240  -­‐  Acceptance  Criteria   1)  XYZ  Field  should  be  read-­‐only   2)  Total  should  match  999.99       Scenario:  Ensure  XYZ  Field  is   read-­‐only  when…   Scenario:  Ensure  Total  is…   Analyst   1.  Three  Amigos   Discuss  User   Story  or  Bug   Developer   Tester   Analyst   PO   @ignore   Scenario  XYZ            Given…            When…            Then…   4.  Developer  Adds   Dra&  SpecificaZon   To  TFS   Developer   Big?  Risky?   Small?   Fix  Now     Technical   Product  Backlog      User  Story  999   Cleanup  XYZ….   8.  Rework,   Refactoring,  or   Cleanup   IdenZfied?   7.  Review     Completed   Test   Developer   Tester   Analyst   6.  Tester,   Analyst  Add   Addl   Scenarios   Given…   When…   Then…     Given…   When…   Then…   Analyst   Tester   ©  Copyright  Ariel  Partners  2014                                  *[email protected]    ((646)  467-­‐7394    
  • 15. 15   GeneraZng  DocumentaZon  From   SpecificaZons   q Pickles Report Generator q Features organized In tree structure q More sophisticated commercial options available (SpecFlow+) ©  Copyright  Ariel  Partners  2014                                  *[email protected]    ((646)  467-­‐7394    
  • 16. 16   Organizing  Automated  Tests:     By  Type   q Named after class being tested q Test project structure mirrors source code product structure q Named after feature q Test project structure mirrors business domain Unit  Tests   Feature  Tests   ©  Copyright  Ariel  Partners  2014                                  *[email protected]    ((646)  467-­‐7394    
  • 17. 17   Organizing  Automated  Tests:     Filter  By  Category   Category   ExecuAon  Speed   Dependencies   ExecuAon  Context   @CI   Very  Fast   None:  Code  Only   Developer,  before   every  check-­‐in   @DB   Slower   Database  structure,  may  use   pre-­‐set  test  data   CI  Build   @smoke   Slowest   Full  Running  System   Nightly  Build   @CI   Scenario:  Ensure  abc…     @DB   Scenario:  Ensure  xyz…       @smoke   Scenario:  Ensure  123…   q  Each individual test case is categorized according to its dependencies q  “Run All Tests” automatically runs the correct set of tests depending on execution context ©  Copyright  Ariel  Partners  2014                                  *[email protected]    ((646)  467-­‐7394    
  • 18. 18    Organizing  Automated  Tests:     Test  Frameworks   SpecFlow  tests  can  be  wri8en  at  different  levels  –  even  within  the   same  feature  file   Feature  File   Unit! ! CodedUI CodedUI Step  DefiniZons  –  ImplementaZon  AlternaZves   Gherkin   ©  Copyright  Ariel  Partners  2014                                  *[email protected]    ((646)  467-­‐7394    
  • 19. 19   Organizing  Automated  Tests:   Examples   Acceptance Criteria 1.  Confirm that a trade that would trigger margin call will require secondary authorization protocol 2.  Confirm that a trader is not allowed to enter a quantity of more than 50,000 shares for an options trade 3.  Confirm that an out of the money trade will be flagged User Story #13628 Enforce Trade Limits For Option Trades Possible  Strategy   Why?   CodedUI  Test  using  Moq   Specific  GUI  is  important  and  needs  to  be  tested   NUnit  test,  no  DB   •  CalculaZon  is  most  important  asset  to  test,  GUI  may   change   •  Legacy  system  is  being  rewripen  and  replacement   system  must  support  same  logic   NUnit  Test  with  DB   •  Significant  base  data  setup  required,  mocking  is  not   pracZcal   •  Significant  logic  to  be  tested  in  the  persistence  layer   CodedUI  Test  with  DB   Full-­‐stack  smoke  test  is  desired  (requires  more   maintenance;  there  should  be  relaZvely  few  of  these)   ©  Copyright  Ariel  Partners  2014                                  *[email protected]    ((646)  467-­‐7394    
  • 20. 20   Extending  BDD  For  Traceability   q Epics  Linked  to  User  Stories  in  TFS   q SpecFlow  Tests  Map  To  User  Stories   User Story 1098 Feature: 1098 Scenario: XYZ Scenario: ABC Epic 1608 User Story 2689 User Story 3104 User Story 7510 Epic 2387 User Story 7513 Feature: 2689 Scenario: XYZ Scenario: ABC Feature: 3104 Scenario: XYZ Scenario: ABC Feature: 7510 Scenario: XYZ Scenario: ABC Feature: 7513 Scenario: XYZ Scenario: ABC Pros   1.  Simple 2.  Easy to track Cons   1.  User story abstraction does not really match feature 2.  Requires maintenance ©  Copyright  Ariel  Partners  2014                                  *[email protected]    ((646)  467-­‐7394    
  • 21. 21   Challenges  for  Maintaining  Traceability   Issues 1.  A user story may describe only part of a true business feature 2.  Later user stories may modify, contradict, or replace earlier user stories Mitigation: Let the tests help 1.  A failing SpecFlow test may indicate an older specification needs maintenance 2.  If the earlier SpecFlow test does not fail, consider whether it is really important to update an earlier user story with new information User  Stories  are  designed  to  be  ephemeral  –  only  ac,ve  within  their  Sprint  or  Release   ©  Copyright  Ariel  Partners  2014                                  *[email protected]    ((646)  467-­‐7394    
  • 22. 22   The  Agile  RTM   q  All system functions expressed as user stories q  All user stories have acceptance criteria q  Each criterion translated to an automated test using structured English (Gherkin) q  Customized report matches epics and user stories to automated acceptance tests q  Test fails unless software is implemented correctly Links  to  Theme   Record  in  TFS   Links  to  Epic   Record  in  TFS   Links  to  User   Story  in  TFS   Links  to  Feature   DocumentaZon   Generated  via  Pickles   ©  Copyright  Ariel  Partners  2014                                  *[email protected]    ((646)  467-­‐7394    
  • 23. 23   GeneraZng  the  Agile  RTM   TFS   Build   PowerShell  Script   TFS   Themes,  Epics,     User  Stories   Console  Runner   Results  of   Automated  Tests   PicklesDoc   Document  GeneraZon   SpecificaZons   Agile  RTM   Project  Portal  /  Wiki  Combine  &  Transform   XML  Files   Publish   ©  Copyright  Ariel  Partners  2014                                  *[email protected]    ((646)  467-­‐7394    
  • 24. 24   Building  A  Test  AutomaZon  Capability   BUILD TESTING CAPABILITY q  Technical Frameworks q  NUnit q  SpecFlow q  Moq q  Reporting Capability q  Test Results q  Code Coverage q  Functional Coverage q  Encouraging Adoption q  Examples Everywhere q  Mentoring q  Pair Programming MAKE THE SYSTEM TESTABLE q  Upgrade dot net framework q  Drop support for old operating systems q  Upgrade third party libraries q  Refactor code to isolate dependencies q  Simplify project structure q  Different components may need different strategies Both Pieces Are Required For Success ©  Copyright  Ariel  Partners  2014                                  *[email protected]    ((646)  467-­‐7394    
  • 25. 25   TransiZonal  Strategy:   StarZng  with  Manual  Test  Cases   Epic Manual TestCase Manual TestCase Manual TestCaseUser Story Manual TestCase Legacy Req Legacy Req q  Import legacy requirements into TFS q  Convert high-level requirements into epics q  Capture manual test cases in MTM q  Link MTM test cases to their requirements and/or epics q  Capture all new work using user stories q  Link legacy system requirements to epics alongside new user stories Epic Legacy Req Legacy Req Gradually migrate legacy “Shall” requirements to user stories and acceptance criteria Plan ©  Copyright  Ariel  Partners  2014                                  *[email protected]    ((646)  467-­‐7394    
  • 26. 26   ConverZng  From  Requirements  to   User  Stories   Why  do  this?   q System  has  long  projected  lifespan   q Planned  re-­‐plarorm,  migraZon,  upgrade,  or   significant  redevelopment     User Story Legacy Req 1  to  1   Legacy Req Acceptance Criterion 1  to  1   User Story Legacy Req 1  to  many   User Story User Story Legacy Req User Storymany  to  1   Legacy Req Legacy Req ©  Copyright  Ariel  Partners  2014                                  *[email protected]    ((646)  467-­‐7394    
  • 27. 27   Legacy  System  Replacement   Benefits  of  SpecFlow  for  re-­‐development   q SpecificaZons  confirm  new  system  meets  requirements   q SpecificaZons  represent  up  to  half  of  overall  effort   q SpecificaZons  provide  documentaZon  for  the  new  system   q Highlights  areas  where  new  system  differs  from  old  system   q Significantly  reduces  risk   Legacy System Replacement System Significant   Reuse   Gherkin   SpecificaZons   Step  DefiniZons   ©  Copyright  Ariel  Partners  2014                                  *[email protected]    ((646)  467-­‐7394    
  • 28. 28   Summary   1.  Traceability  is  important  for  mission  criZcal   and  life  criZcal  so&ware   2.  Automated  test  frameworks  can  provide  the   assurance  we  need   ü Did  we  build  the  right  thing   ü Did  we  build  it  right   ü Are  all  the  required  funcZons  working  correctly   3.  SpecFlow  has  been  proven  effecZve     ©  Copyright  Ariel  Partners  2014                                  *[email protected]    ((646)  467-­‐7394    
  • 29. 29   QuesZons?   ©  Copyright  Ariel  Partners  2014                                  *[email protected]    ((646)  467-­‐7394     We  are  available  for  consulZng  or  Agile  coaching.   Feel  free  to  contact  us!   Ariel  Partners   (646)  467-­‐7394   [email protected]   www.arielpartners.com   @arielpartners     Thank  You!