© Copyright SELA software & Education Labs Ltd. | 14-18 Baruch Hirsch St Bnei Brak, 51202 Israel | www.selagroup.com
SELA DEVELOPER PRACTICE
December 20-24, 2015
Arnon Axelrod
Introduction to ATDD and SpecFlow
Agenda
Problems with regular development processes
ATDD
SpecFlow
ATDD SpecFlow
About myself
Senior Architect and Test Automation Team Lead
at Sela Group
Professional Software Developer
since 1995
Amateur programmer since ~1984 (age 11)
E-mail: arnona@sela.co.il
Blog: http://blogs.microsoft.co.il/ArnonA
Phone: 052-5327296
Problems with regular development processes
Problems with Waterfall
Hard to think of all the details
ahead
Long specs may contain
contradictions that are hard to
see
Communication problems
Most problems are revealed
too late
Resistant to change
Problems with Agile
Requirements/Spec are often
vague
No document of the current
expected state
Chaotic design
Not enough time to test
Challenges with Automated Tests
Testability of the SUT
Reliability
Maintainability
Hard to investigate
Sensitive to small application
changes
Medium bugs tend to be
ignored
Problems with Unit Tests
Does not test integration
Coupled to implementation
Test technical details instead
of user scenario
ATDD
What’s ATDD?
Acronym for “Acceptance Test Driven Development”
Other common names:
BDD (Behavior Driven Design)
SbE (Specification by Example)
Software Development methodology
Expands Agile
The ATDD Process
User Story
• Clear Business Value
• Small!
Define “Done”
• Collaboratively
• As user scenario
Write Failing
Automated Test
• Identical to DoD
• Business Language
Develop
• Make the tests pass
• Keep all tests pass
• Refactor as needed
Done
• Demo
• Exploratory
• Get Feedback
Example
Definition of Done
How will the user use the solution?
(examples!)
How can we demonstrate it?
How will we test it?
Definition of Done!
Benefits of ATDD
For the business / team:
Improves communication and collaboration
Fast customer feedback
Significantly Less bugs
Reliable automation
Accurate documentation
Changes are easy!
Happy Customers!
Benefits of ATDD
For Developers:
No more unclear requirements
Clear focus: make the tests pass!
Easy to keep the code clean
Less messing with bugs
Less debugging
Benefits of ATDD
For Testers:
Actual impact on quality!
No tedious test cycles
More time for exploratory
No more “it works on my machine” 
Benefits of ATDD
For Automation Developers:
Actual impact on quality!
Tests are always green
SUT is always testable
No need for workarounds
Challenges of ATDD
Cultural change
Slicing the user stories
Defining the DoD
SPECFLOW
What is SpecFlow?
A tool for “Binding business requirements to .NET code”
Open Source project
Free
Visual Studio Plug-in
Cucumber for .Net
Demo
SpecFlow
SpecFlow allows us to use Business Requirements as Automatic
Tests
These Requirements are constantly validated
This allows developers to refactor safely
Much less bugs!
Allows Continuous Delivery!
Questions

ATDD with SpecFlow

  • 1.
    © Copyright SELAsoftware & Education Labs Ltd. | 14-18 Baruch Hirsch St Bnei Brak, 51202 Israel | www.selagroup.com SELA DEVELOPER PRACTICE December 20-24, 2015 Arnon Axelrod Introduction to ATDD and SpecFlow
  • 2.
    Agenda Problems with regulardevelopment processes ATDD SpecFlow ATDD SpecFlow
  • 3.
    About myself Senior Architectand Test Automation Team Lead at Sela Group Professional Software Developer since 1995 Amateur programmer since ~1984 (age 11) E-mail: arnona@sela.co.il Blog: http://blogs.microsoft.co.il/ArnonA Phone: 052-5327296
  • 4.
    Problems with regulardevelopment processes
  • 5.
    Problems with Waterfall Hardto think of all the details ahead Long specs may contain contradictions that are hard to see Communication problems Most problems are revealed too late Resistant to change
  • 6.
    Problems with Agile Requirements/Specare often vague No document of the current expected state Chaotic design Not enough time to test
  • 7.
    Challenges with AutomatedTests Testability of the SUT Reliability Maintainability Hard to investigate Sensitive to small application changes Medium bugs tend to be ignored
  • 8.
    Problems with UnitTests Does not test integration Coupled to implementation Test technical details instead of user scenario
  • 9.
  • 10.
    What’s ATDD? Acronym for“Acceptance Test Driven Development” Other common names: BDD (Behavior Driven Design) SbE (Specification by Example) Software Development methodology Expands Agile
  • 11.
    The ATDD Process UserStory • Clear Business Value • Small! Define “Done” • Collaboratively • As user scenario Write Failing Automated Test • Identical to DoD • Business Language Develop • Make the tests pass • Keep all tests pass • Refactor as needed Done • Demo • Exploratory • Get Feedback
  • 12.
  • 13.
    Definition of Done Howwill the user use the solution? (examples!) How can we demonstrate it? How will we test it? Definition of Done!
  • 14.
    Benefits of ATDD Forthe business / team: Improves communication and collaboration Fast customer feedback Significantly Less bugs Reliable automation Accurate documentation Changes are easy! Happy Customers!
  • 15.
    Benefits of ATDD ForDevelopers: No more unclear requirements Clear focus: make the tests pass! Easy to keep the code clean Less messing with bugs Less debugging
  • 16.
    Benefits of ATDD ForTesters: Actual impact on quality! No tedious test cycles More time for exploratory No more “it works on my machine” 
  • 17.
    Benefits of ATDD ForAutomation Developers: Actual impact on quality! Tests are always green SUT is always testable No need for workarounds
  • 18.
    Challenges of ATDD Culturalchange Slicing the user stories Defining the DoD
  • 19.
  • 20.
    What is SpecFlow? Atool for “Binding business requirements to .NET code” Open Source project Free Visual Studio Plug-in Cucumber for .Net
  • 21.
  • 22.
    SpecFlow allows usto use Business Requirements as Automatic Tests These Requirements are constantly validated This allows developers to refactor safely Much less bugs! Allows Continuous Delivery!
  • 23.

Editor's Notes

  • #5 כרוניקה של פרוייקטים שנכשלים (אני הייתי בהרבה כאלה) גם אם הם מצליחים, אז רוב המתכנתים לא רוצים לעבוד עליהם לפני כ-5 שנים גיליתי את השיטה וזה שינה את כל ההסתכלות שלי על פיתוח תוכנה!
  • #22 יצירת טסט יצירת Step Definitions Auto-complete הרצה והצגת התוצאות