SlideShare a Scribd company logo
1 of 36
Acceptance Test Driven
Development in practice
Steven Mak
steven@odd-e.com
What are we up to now?
Lost in translation
Do not explain why
Gaps discovered only until coding started
Cumulative effects of small misunderstandings
Inadequate and essentially flawed requirements and
specifications
Failing to meet actual needs
 are obvious things really obvious?




 Imperative requirements




 Fulfilling specifications does not guarantee success
Meeting the needs with
Acceptance TDD

                   Acceptance Test              Implementation
    Requirement                      Feedback




Drive implementation of a requirement through a set of
automated, executable acceptance tests
ATDD in a Nutshell
Real-world examples to build a shared understanding of the
domain
Select a set of these examples to be a specification and an
acceptance test suite
Automate the verification of acceptance tests
Focus the software development effort on the acceptance
tests
Use the set of acceptance tests to facilitate discussion about
future change requests.
The ATDD cycle
                                                           •Implementation of tests usually
                    coding
                                                            occur before the code is done
                    testing
                                                           • Feature not done until test passes




                                             Feature
Specification architecture




                                              Done
 Workshop customer documentation
                    other activities


                                                           • Activities happen in parallel
   Developers
     Testers
                                                •Team clarifies and implement the feature
                                   Example
 Product Owner
    Architect                       tests        together
Technical writers
                                                •Tests are executable at the end of the ATDD
                                                 Workshop
Benefits of ATDD
Comprehensible examples over complex formulas
Close Collaboration
Definition of Done
Trust and Commitment
Testing on system level
Specification by Examples
Use realistic examples to demonstrate differences in
possibilities instead of abstract requirements
Write specifications down as tables
Workflows:
  Preconditions
  Processing steps
  Verifications
Examples, Tests, and Spec
             can become
 Examples                    Tests
  ela




                              rify
   bo




                            ve
     ra
        te




             Requirements
Specification workshop
Ask the domain experts
Developers and testers should suggest examples of
edges or important issues for discussion
Ubiquitous language
Organise feedback to ensure shared understanding
Use facilitator to stay focused if needed
Distilling the specifications
 Write tests collaboratively
 Examples in a form close to what your automation tool can
 understand
 Keep tests in a form that is human-readable
 Specification over Scripting, describe WHAT, not how
 Acceptance tests to prevent defects, not to discover
 Not necessarily automate anything
 Acceptance tests only work when we can discuss them
Some considerations
User Interface
  Easy?

  Fragile?

  Performance issues?

Boundary of Stub
  Sufficiently close

  Simulators?

Business logic
  Not from developer perspective
Acceptance Test smells
Long tests
Parameters of calculation tests that always have the same
value
Similar test with minor differences
Tests that reflect the way code was written
Tests fail intermittently even though you didn’t change any
code
Interdependent tests, e.g. setup for others
Change
Use existing acceptance tests to discuss future
changes
Seek advices from customer to determine if it specifies
obsolete functionality when test fails
Automate periodic execution of regression tests with CI
Keep tests in the same version control as code
Tools
Table-based frameworks
  FIT, http://fit.c2.com

  RobotFramework, http://robotframework.org

Text-based frameworks
  Exactor, http://exactor.sourceforge.net

  TextTest, http://texttest.carmen.se
FIT
 FIT stands for “Framework for Integrated Tests”
 Most popular framework in-use
 Table-based
 Supporting languages like Java, C/C++, C#, Python, or
 Ruby
 FitLibrary to extend FIT
FIT in practice
                          Test doc
                         with tables

    Customer writes a
                                       Technical staff enhance
     test document
                                        the tables in the doc
   containing examples

                                                                 Test doc with
                                                                   sanitised
                                                                    tables
                                           Technical staff
     Executable Test                     implements fixture
                                              classes

                          Test doc and
                          backing code
                           (e.g. Java)
FIT Document
Customers write acceptance tests in their own
language using their own tools.
Fixtures
 Take information from the tables and turn them into
 method calls on the actual application.
 ColumnFixture - checking rules and calculations
 ActionFixture - Step-by-step processing
 RowFixture - Checking sets of data
Fixture example
Robot Framework
Python-based Keyword-driven test automation framework
Test libraries implemented either in Python or Java (with
remote library available in many other languages thru XML-
RPC)
Test cases are written in tabular format, save in HTML or TSV
files
Syntax similar to natural language
Users can create new keywords from existing ones and
contribute to the project
Preparing Test cases
Workflow tests - takes in initial state, action, verified
that the system behaved as expected
                       Test procedure using keywords


                                                           Keyword arguments
 Test case name


             Test Case            Action               Argument
             Valid Login    Open Login Page
                               Input Name               demo
                             Input Password             mode
                            Submit Credentials
Higher-level test cases
 Free text suitable for communication even with non-
 technical customers
 Support given-when-then format in BDD
Data-driven test cases
 Define a keyword which will take the input data and
 prepare a table with test cases
Test case organisation
 Simple way: Single HTML file containing all test cases
 Test case tagging
Execution
Gathering test cases, reading and setting variables
Executing all actions for every test case
Providing global statistics
Writing the output in XML format
Generating report and log in HTML format
Sample execution result
Sample Test Report
in HTML format, showing all actions executed up to the
failing action, with fail message
Tested application Interface
 Command line
   OperatingSystem
   SSHLibrary
   Telnet library
 Web
   Robot Selenium
 GUI
   Swing GUI library
Adoption
Sense of achievement

Integrity

Openness

Right timing
Facilitate Adoption
 Evangelise - increase awareness
 Lower the bar - quick path to the first success
 Train and educate - from general training to specific needs
 Share and infect - sit together and sharing sessions
 Coach and facilitate - learn about yourselves and cope with the findings
 Involve others - know the stake-holder groups and give them roles
Ideal candidate to work with
 Shared interest in success
 Authority to make decision
 Ability to understand implications
 Ability to explain the domain
Variations - an escape?
 Behaviour-driven development
 Example-driven development
 Executable specifications
 Names do not matter, but underlying practices matter
 Worthwhile to try if your business people do not like
 “testing”
Organisational Challenges
Business Analysts
  Great choice for the facilitator of the spec workshop

  Working with Acceptance tests makes BA’s work easier

Testers
  Help people avoid problems, not to discover them

  Automation of acceptance test gives testers more time to test manual things

Developers
  Spec workshop gives a good chance to discuss with domain experts

  Both unit tests and acceptance tests are important
References
Bridging the Communication Gap
  Gojko Adzic

Practical TDD and ATDD for Java Developers
  Lasse Koskela

Agile Testing
  Lisa Crispin and Janet Gregory
Thank you!
                                  Steven Mak
                   Email: steven@odd-e.com
       Twitter: http://twitter.com/stevenmak

More Related Content

What's hot

Agile testing principles and practices - Anil Karade
Agile testing principles and practices - Anil KaradeAgile testing principles and practices - Anil Karade
Agile testing principles and practices - Anil KaradeIndicThreads
 
Test Driven Development (TDD)
Test Driven Development (TDD)Test Driven Development (TDD)
Test Driven Development (TDD)David Ehringer
 
Agile Testing and Test Automation
Agile Testing and Test AutomationAgile Testing and Test Automation
Agile Testing and Test AutomationNaveen Kumar Singh
 
An Introduction to Test Driven Development
An Introduction to Test Driven Development An Introduction to Test Driven Development
An Introduction to Test Driven Development CodeOps Technologies LLP
 
Introduction to TDD (Test Driven development) - Ahmed Shreef
Introduction to TDD (Test Driven development) - Ahmed ShreefIntroduction to TDD (Test Driven development) - Ahmed Shreef
Introduction to TDD (Test Driven development) - Ahmed ShreefAhmed Shreef
 
ATDD - Acceptance Test Driven Development
ATDD - Acceptance Test Driven DevelopmentATDD - Acceptance Test Driven Development
ATDD - Acceptance Test Driven DevelopmentNaresh Jain
 
Effective Agile Retrospectives
Effective Agile RetrospectivesEffective Agile Retrospectives
Effective Agile RetrospectivesYuval Yeret
 
TDD And Refactoring
TDD And RefactoringTDD And Refactoring
TDD And RefactoringNaresh Jain
 
Agile Testing Framework - The Art of Automated Testing
Agile Testing Framework - The Art of Automated TestingAgile Testing Framework - The Art of Automated Testing
Agile Testing Framework - The Art of Automated TestingDimitri Ponomareff
 
TDD - Test Driven Development
TDD - Test Driven DevelopmentTDD - Test Driven Development
TDD - Test Driven DevelopmentTung Nguyen Thanh
 
Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Lars Thorup
 
Testing in Agile Projects
Testing in Agile ProjectsTesting in Agile Projects
Testing in Agile Projectssriks7
 
Continuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CIContinuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CIDavid Hahn
 
Shift Left Testing: Going Beyond Agile
Shift Left Testing: Going Beyond AgileShift Left Testing: Going Beyond Agile
Shift Left Testing: Going Beyond AgileTechWell
 
How to implement DevOps in your Organization
How to implement DevOps in your OrganizationHow to implement DevOps in your Organization
How to implement DevOps in your OrganizationDalibor Blazevic
 
Introduction to CICD
Introduction to CICDIntroduction to CICD
Introduction to CICDKnoldus Inc.
 

What's hot (20)

Agile Testing by Example
Agile Testing by ExampleAgile Testing by Example
Agile Testing by Example
 
Agile testing principles and practices - Anil Karade
Agile testing principles and practices - Anil KaradeAgile testing principles and practices - Anil Karade
Agile testing principles and practices - Anil Karade
 
Test Driven Development (TDD)
Test Driven Development (TDD)Test Driven Development (TDD)
Test Driven Development (TDD)
 
Agile Testing and Test Automation
Agile Testing and Test AutomationAgile Testing and Test Automation
Agile Testing and Test Automation
 
TDD - Agile
TDD - Agile TDD - Agile
TDD - Agile
 
An Introduction to Test Driven Development
An Introduction to Test Driven Development An Introduction to Test Driven Development
An Introduction to Test Driven Development
 
Introduction to TDD (Test Driven development) - Ahmed Shreef
Introduction to TDD (Test Driven development) - Ahmed ShreefIntroduction to TDD (Test Driven development) - Ahmed Shreef
Introduction to TDD (Test Driven development) - Ahmed Shreef
 
ATDD - Acceptance Test Driven Development
ATDD - Acceptance Test Driven DevelopmentATDD - Acceptance Test Driven Development
ATDD - Acceptance Test Driven Development
 
Effective Agile Retrospectives
Effective Agile RetrospectivesEffective Agile Retrospectives
Effective Agile Retrospectives
 
TDD And Refactoring
TDD And RefactoringTDD And Refactoring
TDD And Refactoring
 
CI/CD
CI/CDCI/CD
CI/CD
 
Agile Testing Framework - The Art of Automated Testing
Agile Testing Framework - The Art of Automated TestingAgile Testing Framework - The Art of Automated Testing
Agile Testing Framework - The Art of Automated Testing
 
TDD - Test Driven Development
TDD - Test Driven DevelopmentTDD - Test Driven Development
TDD - Test Driven Development
 
Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)Test and Behaviour Driven Development (TDD/BDD)
Test and Behaviour Driven Development (TDD/BDD)
 
Testing in Agile Projects
Testing in Agile ProjectsTesting in Agile Projects
Testing in Agile Projects
 
Continuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CIContinuous Integration/Deployment with Gitlab CI
Continuous Integration/Deployment with Gitlab CI
 
Shift Left Testing: Going Beyond Agile
Shift Left Testing: Going Beyond AgileShift Left Testing: Going Beyond Agile
Shift Left Testing: Going Beyond Agile
 
Azure DevOps
Azure DevOpsAzure DevOps
Azure DevOps
 
How to implement DevOps in your Organization
How to implement DevOps in your OrganizationHow to implement DevOps in your Organization
How to implement DevOps in your Organization
 
Introduction to CICD
Introduction to CICDIntroduction to CICD
Introduction to CICD
 

Similar to ATDD in Practice

Odd E验收测试驱动开发实战
Odd E验收测试驱动开发实战Odd E验收测试驱动开发实战
Odd E验收测试驱动开发实战George Ang
 
Introduction to Acceptance Test Driven Development
Introduction to Acceptance Test Driven DevelopmentIntroduction to Acceptance Test Driven Development
Introduction to Acceptance Test Driven DevelopmentSteven Mak
 
QA with Microsoft Test Manager and Lab Management
QA with Microsoft Test Manager and Lab ManagementQA with Microsoft Test Manager and Lab Management
QA with Microsoft Test Manager and Lab ManagementRofiqi Setiawan
 
qawithmicrosofttestmanagerandlabmanagement
qawithmicrosofttestmanagerandlabmanagementqawithmicrosofttestmanagerandlabmanagement
qawithmicrosofttestmanagerandlabmanagementsunil singh
 
Test Driven Development - Overview and Adoption
Test Driven Development - Overview and AdoptionTest Driven Development - Overview and Adoption
Test Driven Development - Overview and AdoptionPyxis Technologies
 
Essential practices and thinking tools for Agile Adoption
Essential practices and thinking tools for Agile AdoptionEssential practices and thinking tools for Agile Adoption
Essential practices and thinking tools for Agile AdoptionSteven Mak
 
TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012
TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012
TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012Tieturi Oy
 
Software Quality and Test Strategies for Ruby and Rails Applications
Software Quality and Test Strategies for Ruby and Rails ApplicationsSoftware Quality and Test Strategies for Ruby and Rails Applications
Software Quality and Test Strategies for Ruby and Rails ApplicationsBhavin Javia
 
Trends in Agile Testing by Lisa Crispin
Trends in Agile Testing by Lisa CrispinTrends in Agile Testing by Lisa Crispin
Trends in Agile Testing by Lisa CrispinDirecti Group
 
03 test specification and execution
03   test specification and execution03   test specification and execution
03 test specification and executionClemens Reijnen
 
Testing Sap: Modern Methodology
Testing Sap: Modern MethodologyTesting Sap: Modern Methodology
Testing Sap: Modern MethodologyEthan Jewett
 
SPCA2013 - Test-driven Development with SharePoint 2013 and Visual Studio
SPCA2013 - Test-driven Development with SharePoint 2013 and Visual StudioSPCA2013 - Test-driven Development with SharePoint 2013 and Visual Studio
SPCA2013 - Test-driven Development with SharePoint 2013 and Visual StudioNCCOMMS
 
SAP Testing Services
SAP Testing ServicesSAP Testing Services
SAP Testing Servicesr_shanki
 
Keyword Driven Testing
Keyword Driven TestingKeyword Driven Testing
Keyword Driven TestingMaveryx
 
CucumberSeleniumWD
CucumberSeleniumWDCucumberSeleniumWD
CucumberSeleniumWDVikas Sarin
 
Agile Testing 20021015
Agile Testing 20021015Agile Testing 20021015
Agile Testing 20021015Raghu Karnati
 
1 Ads
1 Ads1 Ads
1 Adslcbj
 
Incorporating Performance Testing in Agile Development Process
Incorporating Performance Testing in Agile Development ProcessIncorporating Performance Testing in Agile Development Process
Incorporating Performance Testing in Agile Development ProcessMichael Vax
 

Similar to ATDD in Practice (20)

Odd E验收测试驱动开发实战
Odd E验收测试驱动开发实战Odd E验收测试驱动开发实战
Odd E验收测试驱动开发实战
 
Introduction to Acceptance Test Driven Development
Introduction to Acceptance Test Driven DevelopmentIntroduction to Acceptance Test Driven Development
Introduction to Acceptance Test Driven Development
 
QA with Microsoft Test Manager and Lab Management
QA with Microsoft Test Manager and Lab ManagementQA with Microsoft Test Manager and Lab Management
QA with Microsoft Test Manager and Lab Management
 
qawithmicrosofttestmanagerandlabmanagement
qawithmicrosofttestmanagerandlabmanagementqawithmicrosofttestmanagerandlabmanagement
qawithmicrosofttestmanagerandlabmanagement
 
Test Driven Development - Overview and Adoption
Test Driven Development - Overview and AdoptionTest Driven Development - Overview and Adoption
Test Driven Development - Overview and Adoption
 
Essential practices and thinking tools for Agile Adoption
Essential practices and thinking tools for Agile AdoptionEssential practices and thinking tools for Agile Adoption
Essential practices and thinking tools for Agile Adoption
 
Agile testing
Agile testingAgile testing
Agile testing
 
TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012
TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012
TechDays 2013 Juhani Lind: Acceptance Test Driven Development With VS 2012
 
Software Quality and Test Strategies for Ruby and Rails Applications
Software Quality and Test Strategies for Ruby and Rails ApplicationsSoftware Quality and Test Strategies for Ruby and Rails Applications
Software Quality and Test Strategies for Ruby and Rails Applications
 
Trends in Agile Testing by Lisa Crispin
Trends in Agile Testing by Lisa CrispinTrends in Agile Testing by Lisa Crispin
Trends in Agile Testing by Lisa Crispin
 
03 test specification and execution
03   test specification and execution03   test specification and execution
03 test specification and execution
 
Testing Sap: Modern Methodology
Testing Sap: Modern MethodologyTesting Sap: Modern Methodology
Testing Sap: Modern Methodology
 
SPCA2013 - Test-driven Development with SharePoint 2013 and Visual Studio
SPCA2013 - Test-driven Development with SharePoint 2013 and Visual StudioSPCA2013 - Test-driven Development with SharePoint 2013 and Visual Studio
SPCA2013 - Test-driven Development with SharePoint 2013 and Visual Studio
 
SAP Testing Services
SAP Testing ServicesSAP Testing Services
SAP Testing Services
 
Keyword Driven Testing
Keyword Driven TestingKeyword Driven Testing
Keyword Driven Testing
 
Pariksha testing services
Pariksha testing servicesPariksha testing services
Pariksha testing services
 
CucumberSeleniumWD
CucumberSeleniumWDCucumberSeleniumWD
CucumberSeleniumWD
 
Agile Testing 20021015
Agile Testing 20021015Agile Testing 20021015
Agile Testing 20021015
 
1 Ads
1 Ads1 Ads
1 Ads
 
Incorporating Performance Testing in Agile Development Process
Incorporating Performance Testing in Agile Development ProcessIncorporating Performance Testing in Agile Development Process
Incorporating Performance Testing in Agile Development Process
 

More from Steven Mak

Continuous Security Testing
Continuous Security TestingContinuous Security Testing
Continuous Security TestingSteven Mak
 
Quality comes free with open source testing tools
Quality comes free with open source testing toolsQuality comes free with open source testing tools
Quality comes free with open source testing toolsSteven Mak
 
Adopting technical practices 2013
Adopting technical practices 2013Adopting technical practices 2013
Adopting technical practices 2013Steven Mak
 
100 doors kata solution
100 doors kata solution100 doors kata solution
100 doors kata solutionSteven Mak
 
Bossless companies
Bossless companiesBossless companies
Bossless companiesSteven Mak
 
Is this how you hate unit testing?
Is this how you hate unit testing?Is this how you hate unit testing?
Is this how you hate unit testing?Steven Mak
 
Driving Quality with TDD
Driving Quality with TDDDriving Quality with TDD
Driving Quality with TDDSteven Mak
 
Unbearable Test Code Smell
Unbearable Test Code SmellUnbearable Test Code Smell
Unbearable Test Code SmellSteven Mak
 
Sustainable TDD
Sustainable TDDSustainable TDD
Sustainable TDDSteven Mak
 

More from Steven Mak (9)

Continuous Security Testing
Continuous Security TestingContinuous Security Testing
Continuous Security Testing
 
Quality comes free with open source testing tools
Quality comes free with open source testing toolsQuality comes free with open source testing tools
Quality comes free with open source testing tools
 
Adopting technical practices 2013
Adopting technical practices 2013Adopting technical practices 2013
Adopting technical practices 2013
 
100 doors kata solution
100 doors kata solution100 doors kata solution
100 doors kata solution
 
Bossless companies
Bossless companiesBossless companies
Bossless companies
 
Is this how you hate unit testing?
Is this how you hate unit testing?Is this how you hate unit testing?
Is this how you hate unit testing?
 
Driving Quality with TDD
Driving Quality with TDDDriving Quality with TDD
Driving Quality with TDD
 
Unbearable Test Code Smell
Unbearable Test Code SmellUnbearable Test Code Smell
Unbearable Test Code Smell
 
Sustainable TDD
Sustainable TDDSustainable TDD
Sustainable TDD
 

Recently uploaded

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 

Recently uploaded (20)

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 

ATDD in Practice

  • 1. Acceptance Test Driven Development in practice Steven Mak steven@odd-e.com
  • 2. What are we up to now? Lost in translation Do not explain why Gaps discovered only until coding started Cumulative effects of small misunderstandings Inadequate and essentially flawed requirements and specifications
  • 3. Failing to meet actual needs are obvious things really obvious? Imperative requirements Fulfilling specifications does not guarantee success
  • 4. Meeting the needs with Acceptance TDD Acceptance Test Implementation Requirement Feedback Drive implementation of a requirement through a set of automated, executable acceptance tests
  • 5. ATDD in a Nutshell Real-world examples to build a shared understanding of the domain Select a set of these examples to be a specification and an acceptance test suite Automate the verification of acceptance tests Focus the software development effort on the acceptance tests Use the set of acceptance tests to facilitate discussion about future change requests.
  • 6. The ATDD cycle •Implementation of tests usually coding occur before the code is done testing • Feature not done until test passes Feature Specification architecture Done Workshop customer documentation other activities • Activities happen in parallel Developers Testers •Team clarifies and implement the feature Example Product Owner Architect tests together Technical writers •Tests are executable at the end of the ATDD Workshop
  • 7. Benefits of ATDD Comprehensible examples over complex formulas Close Collaboration Definition of Done Trust and Commitment Testing on system level
  • 8. Specification by Examples Use realistic examples to demonstrate differences in possibilities instead of abstract requirements Write specifications down as tables Workflows: Preconditions Processing steps Verifications
  • 9. Examples, Tests, and Spec can become Examples Tests ela rify bo ve ra te Requirements
  • 10. Specification workshop Ask the domain experts Developers and testers should suggest examples of edges or important issues for discussion Ubiquitous language Organise feedback to ensure shared understanding Use facilitator to stay focused if needed
  • 11. Distilling the specifications Write tests collaboratively Examples in a form close to what your automation tool can understand Keep tests in a form that is human-readable Specification over Scripting, describe WHAT, not how Acceptance tests to prevent defects, not to discover Not necessarily automate anything Acceptance tests only work when we can discuss them
  • 12. Some considerations User Interface Easy? Fragile? Performance issues? Boundary of Stub Sufficiently close Simulators? Business logic Not from developer perspective
  • 13. Acceptance Test smells Long tests Parameters of calculation tests that always have the same value Similar test with minor differences Tests that reflect the way code was written Tests fail intermittently even though you didn’t change any code Interdependent tests, e.g. setup for others
  • 14. Change Use existing acceptance tests to discuss future changes Seek advices from customer to determine if it specifies obsolete functionality when test fails Automate periodic execution of regression tests with CI Keep tests in the same version control as code
  • 15. Tools Table-based frameworks FIT, http://fit.c2.com RobotFramework, http://robotframework.org Text-based frameworks Exactor, http://exactor.sourceforge.net TextTest, http://texttest.carmen.se
  • 16. FIT FIT stands for “Framework for Integrated Tests” Most popular framework in-use Table-based Supporting languages like Java, C/C++, C#, Python, or Ruby FitLibrary to extend FIT
  • 17. FIT in practice Test doc with tables Customer writes a Technical staff enhance test document the tables in the doc containing examples Test doc with sanitised tables Technical staff Executable Test implements fixture classes Test doc and backing code (e.g. Java)
  • 18. FIT Document Customers write acceptance tests in their own language using their own tools.
  • 19. Fixtures Take information from the tables and turn them into method calls on the actual application. ColumnFixture - checking rules and calculations ActionFixture - Step-by-step processing RowFixture - Checking sets of data
  • 21. Robot Framework Python-based Keyword-driven test automation framework Test libraries implemented either in Python or Java (with remote library available in many other languages thru XML- RPC) Test cases are written in tabular format, save in HTML or TSV files Syntax similar to natural language Users can create new keywords from existing ones and contribute to the project
  • 22. Preparing Test cases Workflow tests - takes in initial state, action, verified that the system behaved as expected Test procedure using keywords Keyword arguments Test case name Test Case Action Argument Valid Login Open Login Page Input Name demo Input Password mode Submit Credentials
  • 23. Higher-level test cases Free text suitable for communication even with non- technical customers Support given-when-then format in BDD
  • 24. Data-driven test cases Define a keyword which will take the input data and prepare a table with test cases
  • 25. Test case organisation Simple way: Single HTML file containing all test cases Test case tagging
  • 26. Execution Gathering test cases, reading and setting variables Executing all actions for every test case Providing global statistics Writing the output in XML format Generating report and log in HTML format
  • 28. Sample Test Report in HTML format, showing all actions executed up to the failing action, with fail message
  • 29. Tested application Interface Command line OperatingSystem SSHLibrary Telnet library Web Robot Selenium GUI Swing GUI library
  • 31. Facilitate Adoption Evangelise - increase awareness Lower the bar - quick path to the first success Train and educate - from general training to specific needs Share and infect - sit together and sharing sessions Coach and facilitate - learn about yourselves and cope with the findings Involve others - know the stake-holder groups and give them roles
  • 32. Ideal candidate to work with Shared interest in success Authority to make decision Ability to understand implications Ability to explain the domain
  • 33. Variations - an escape? Behaviour-driven development Example-driven development Executable specifications Names do not matter, but underlying practices matter Worthwhile to try if your business people do not like “testing”
  • 34. Organisational Challenges Business Analysts Great choice for the facilitator of the spec workshop Working with Acceptance tests makes BA’s work easier Testers Help people avoid problems, not to discover them Automation of acceptance test gives testers more time to test manual things Developers Spec workshop gives a good chance to discuss with domain experts Both unit tests and acceptance tests are important
  • 35. References Bridging the Communication Gap Gojko Adzic Practical TDD and ATDD for Java Developers Lasse Koskela Agile Testing Lisa Crispin and Janet Gregory
  • 36. Thank you! Steven Mak Email: steven@odd-e.com Twitter: http://twitter.com/stevenmak

Editor's Notes