SlideShare a Scribd company logo
Agile testingAgile Mëtteg – 15 July 2010
Agile Mëtteg in 2010Complete Agile Mëtteg calendar onwww.agilepartner.net/agility_seminars.html15 July 2010Agile Mëtteg - Agile Testing2
OBJECTIVES & AGENDAObjectivesThis session will focus on a Agile Testing and provide you with practical examples and techniques to help your team understand what is behind this approach.AgendaIntroduction of Agile PartnerThe attendeesWhat is agile testing? And why? And how? Unit testing Behaviour Driven Development Test Driven Development Acceptance testing Q&A 15 July 2010Agile Mëtteg - Agile Testing3
AGILE PARTNER SERVICES15 July 2010Agile Mëtteg - Agile testing4IS users Services1Custom Software Development & MaintenanceOur core business to answer customer needsIS servicesThanks to our expertise we can support IT team to reach their productivity & quality objectives (Assessment, Coaching, Support, Training, Resource delegation…)IS SolutionsTake benefit from commercial or Open Source platform to answer as quick as possible to specific needsIS users servicesWe can support Product & Services owners to work closely with the IT team (Assessment, Coaching, Support, Training, Resource delegation…)4Software Development & SoftwareMaintenance2ISSolutionsIS ServicesAgilityAgility31234Agility
NEXT TRAININGS & CERTIFICATIONS15 July 2010Agile Mëtteg - Agile testing5-15%Complete calendar on: http://www.agilepartner.net/training/training_calendar.html
Let’s get acquaintedJuly 15th, 2010Agile Mëtteg – Agile Testing6
PRESENTATION OF THE ATTENDEESWho are you ?What is your role ?What do you know about agility ?What are your expectations ?July 15th, 2010Agile Mëtteg – Agile Testing7
AGENDAAgendaWhat is agile testing? And why? And how?Unit testingTest Driven DevelopmentAcceptance testingBehaviour Driven Development15 July 2010Agile Mëtteg - Agile testing8
WHAT IS SOFTWARE TESTING?Definition:Software testing is an investigation conducted to provide stakeholders with information about the quality of the product or service under test.(Wikipedia)15 July 2010Agile Mëtteg - Agile testing9
WHAT IS SOFTWARE TESTING?Definition:Software testing is a way to measure the quality of the product using tests.(Stephan Zimmer & Eric Ferrot)15 July 2010Agile Mëtteg - Agile testing10
MEASURING QUALITYMeasuring quality using tests:tests to find defectsfunctional / non-functional testinga LOT of kinds of tests15 July 2010Agile Mëtteg - Agile testing11
15 July 2010Agile Mëtteg - Agile testing12SO WHAT IS AGILE TESTING ?… AND WHY?… AND HOW?
Traditional / Waterfall approachTesting is done after the developmentWHAT IS AGILE TESTING?15 July 2010Agile Mëtteg - Agile testing13
Agile approachTesting is part of the development processWHAT IS AGILE TESTING?15 July 2010Agile Mëtteg - Agile testing14Iteration 1Iteration 2Iteration nNo specific order
WHAT IS AGILE TESTING?15 July 2010Agile Mëtteg - Agile testing15ProgrammerTraditional / Waterfall approachTesting is done after the developmentClear separation of rolesDomain ExpertTester
Agile approachTesting is part of the development processA whole teamWHAT IS AGILE TESTING?15 July 2010Agile Mëtteg - Agile testing16ProgrammerProgrammerDomain ExpertTesterTester
Agile testing places an increased portion of the testing in the hands of the developersWait… WHAT?!?!I’m a programmer not a testerIt’s trivial I don’tneed a testI don’t have time for testingMy code isverydifficult to testWHAT IS AGILE TESTING?15 July 2010Agile Mëtteg - Agile testing17
WHY AGILE TESTING?WHY should developers write tests?Fear / ConfidenceDo you dare to change the code?	 Tests = safety netIt places developers as users	 Better usabilityIt makes the code testable	 Better design15 July 2010Agile Mëtteg - Agile testing18
WHY AGILE TESTING?A better design“How good the design is doesn't matter near as much as whether the design is getting better or worse. If it is getting better, day by day, I can live with it forever. If it is getting worse, I will die.”(Kent Beck )15 July 2010Agile Mëtteg - Agile testing19
AGILE TESTING… HOW?Agile testing… HOW?Unit testingTest Driven DevelopmentAcceptance testingBehaviour Driven Development15 July 2010Agile Mëtteg - Agile testing20
BUT FIRST…15 July 2010Agile Mëtteg - Agile testing21
LET US INTRODUCE YOU TO…15 July 2010Agile Mëtteg - Agile testing22TIME MASTER TIM!
AGILE TESTING… HOW?DINO LEGSA real projectA new feature: „The Crystal Quest“15 July 2010Agile Mëtteg - Agile testing23http://dinolegs.blogspot.com/
UNIT TESTING15 July 2010Agile Mëtteg - Agile testing24
UNIT TESTINGDefinitionsUnit : 	Smallest testable part of an applicationUnit test : 	A method to test a unit15 July 2010Agile Mëtteg - Agile testing25
UNIT TESTINGSome bad things about unit tests:Expensive to write and expensive to maintainYou can test too muchYou can test the wrong thingsPossibility to get false sense of security when all tests passNo integration tests15 July 2010Agile Mëtteg - Agile testing26
UNIT TESTINGWhy write unit tests?More confidence in the codeAvoid regressionTests themselves are documentationEncourages better software design: minimal interfaces and modularity			15 July 2010Agile Mëtteg - Agile testing27
UNIT TESTINGThe „3A“ patternArrangeActAssert15 July 2010Agile Mëtteg - Agile testing28
UNIT TESTINGF.I.R.S.T.FastIndependentRepeatableSelf-ValidatingTimely[Clean Code – Robert C. Martin]15 July 2010Agile Mëtteg - Agile testing29
UNIT TESTING„The act of writing a unit test is more an act of design than of verification“(Robert C. Martin)15 July 2010Agile Mëtteg - Agile testing30
UNIT TESTINGA lot of existing unit testing…	xUnit (NUnit, Junit, csUnit, …), MSTest, Pex, Visual Studio UTF, etc.…and mocking frameworks	Moq, Rhino Mocks, Moles, TypeMock, JMock, etc.15 July 2010Agile Mëtteg - Agile testing31
TEST DRIVEN DEVELOPMENT (TDD)15 July 2010Agile Mëtteg - Agile testing32
TEST DRIVEN DEVELOPMENT (TDD)15 July 2010Agile Mëtteg - Agile testing33Unit TestWhat is TDD? Difference to unit testingWrite the unit testCodeFIRST!
TEST DRIVEN DEVELOPMENT (TDD)What is TDD? Difference to unit testingWrite the unit test FIRST!« Red – Green – Refactor » pattern15 July 2010Agile Mëtteg - Agile testing34
TEST DRIVEN DEVELOPMENT (TDD)Red – Green – RefactorMake it failwrite the test firstMake it workwrite the simplest implementationMake it betterrefactor without changing the behavior15 July 2010Agile Mëtteg - Agile testing35
TEST DRIVEN DESIGN (TDD)TDD is not only about testingAlso called Test Driven DesignTDD is a methodology that helps creating a good design when developing code. 15 July 2010Agile Mëtteg - Agile testing36
TEST DRIVEN DESIGN (TDD)TDD is not only about testingAlso called Test Driven DesignTDD consequencesYAGNIDRYLaw of DemeterSingle responsibility principleInterface segregation principleInversion of control15 July 2010Agile Mëtteg - Agile testing37GOOD DESIGN !
TEST DRIVEN DEVELOPMENT (TDD)DEMO15 July 2010Agile Mëtteg - Agile testing38
ACCEPTANCE TESTING15 July 2010Agile Mëtteg - Agile testing39
ACCEPTANCE TESTINGUnit testing tells us that the code is meeting the programmer‘s expectationsUnit testing is essential but not sufficientAcceptance tests are specifications for thedesired behaviour and functionality of a system.Customer orientedAbout the what and not the howUsually black box system testsIntegration tests character15 July 2010Agile Mëtteg - Agile testing40
ACCEPTANCE TESTINGImplementing acceptance tests means automationExamples of automation tools:Framework for Integrated Test (Fit) is an open-source tool for automated acceptance testFitnesse is a webserver, a wiki and an automated testing tool based on Fit15 July 2010Agile Mëtteg - Agile testing41
ACCEPTANCE TESTINGDEMO15 July 2010Agile Mëtteg - Agile testing42
BEHAVIOUR DRIVEN DEVELOPMENT (BDD)15 July 2010Agile Mëtteg - Agile testing43
BEHAVIOUR DRIVEN DEVELOPMENTBehaviour Driven Development (BDD)Evolution of TDD introduced by Dan NorthUsing terminology focused on the behavioural aspects of the system rather than testing Unit ≠ behaviour	 Focus on why the code should be created Business value  >  Code Specification  >  Test15 July 2010Agile Mëtteg - Agile testing44
BEHAVIOUR DRIVEN DEVELOPMENTOutside-in methodology	 from the known to the unknownHelps the developer to think YAGNI	 Leads to better design	 BDD = Behaviour Driven DesignDon‘t forget about the roots (TDD)	 Red – Green – Refactor15 July 2010Agile Mëtteg - Agile testing45
BEHAVIOUR DRIVEN DEVELOPMENTProgrammerUbiquitous languagebased on the business domainCommon vocabulary between participantsMinimizes translationAvoids miscommunicationMakes it easier to validate earlyDomain ExpertTester15 July 2010Agile Mëtteg - Agile testing46
BEHAVIOUR DRIVEN DEVELOPMENTStory frameworkEach feature is captured in a „story“, which defines the scope of the feature along with its acceptance criteriaFeatureFeature: TitleAs a [role]I want [feature]so that [benefit]Feature: Crystal questAs a playerI want to collect time crystalsso that I am able to complete the crystal quest15 July 2010Agile Mëtteg - Agile testing47
BEHAVIOUR DRIVEN DEVELOPMENTScenario / Acceptance criteriaScenario:TitleGiven some initial context,And some additional context,When an event occurs,Then ensure some outcomesScenario 1:Tim loses a crystalGiven a Tim is on screenAnd a crystal is on screen,When Tim dies,Then the crystal disappearsAnd Tim‘s player score is decreased by 20Scenario 2:Tim collects a crystalGiven Tim is on screenAnd a crystal is on screen,When Tim touches the crystal,Then the crystal disappearsAnd a nice music is playedAnd Tim‘s player score is increased by 10015 July 2010Agile Mëtteg - Agile testing48
BEHAVIOUR DRIVEN DEVELOPMENTSeveral existing tools for automationJBehave, NBehave, JSpec, NSpec, CppSpec, PHPSpec, SpecFlow, RSpec, Cucumber, …	 Executable specification	 Quick feedback and regression testing	 Requirements are tests	 Tests are documentation15 July 2010Agile Mëtteg - Agile testing49
BEHAVIOUR DRIVEN DEVELOPMENTDEMO15 July 2010Agile Mëtteg - Agile testing50
SUMMARY15 July 2010Agile Mëtteg - Agile testing51
SUMMARYSome things to remember about Agile Testing:Testing is part of the development processWhole-team approach: roles not that strictly separated as in traditional approachBuilding a testable architecture leads to a better design... and don‘t forget!Setup a working environment15 July 2010Agile Mëtteg - Agile testing52

More Related Content

PPTX
Agile Mëtteg series session 8
PPTX
Agile Mëtteg - Jan. 2011
PPTX
Agile Mëtteg #5: Agile Testing
PPTX
Agile Mëtteg series session 9
PPTX
Agile Mëtteg series - Session 4
PDF
The Agile BA (Business Analyst)
PPTX
Requirementless testing
PPTX
Who is the Product Owner Anyway
Agile Mëtteg series session 8
Agile Mëtteg - Jan. 2011
Agile Mëtteg #5: Agile Testing
Agile Mëtteg series session 9
Agile Mëtteg series - Session 4
The Agile BA (Business Analyst)
Requirementless testing
Who is the Product Owner Anyway

What's hot (19)

PPT
Agile project kick off from the trenches
PDF
The Business Analyst’s Critical Role in Agile Projects
PDF
HOT TOPIC REPORT DIVYA
PPTX
Scrum Master Interview Questions SlideShare
PDF
PMI-ACP Lesson 12 Knowledge and Skills Nugget 2
PDF
Agile Fundamentals
PPTX
Business Value Driven Portfolio Management
PPTX
Essential SAFe and Launching your first Agile Release Train
KEY
Agile Software Development, Overview
PPTX
Software development with agile methodologies
PPTX
Agile survival kit
PPTX
Post agile confessions
PDF
Agile Software Development at UPT DEGI | Nov, 2015
PDF
Product Owner Super Powers
PDF
The Role of a BA on a Scrum Team IIBA Presentation 2010
PDF
Scaling agile Principles and Practices
PPTX
Product Owner
PDF
Demystifying the Role of Product Owner
PPTX
Scaling Agile and Scrum (cPrime/Angela Johnson)
Agile project kick off from the trenches
The Business Analyst’s Critical Role in Agile Projects
HOT TOPIC REPORT DIVYA
Scrum Master Interview Questions SlideShare
PMI-ACP Lesson 12 Knowledge and Skills Nugget 2
Agile Fundamentals
Business Value Driven Portfolio Management
Essential SAFe and Launching your first Agile Release Train
Agile Software Development, Overview
Software development with agile methodologies
Agile survival kit
Post agile confessions
Agile Software Development at UPT DEGI | Nov, 2015
Product Owner Super Powers
The Role of a BA on a Scrum Team IIBA Presentation 2010
Scaling agile Principles and Practices
Product Owner
Demystifying the Role of Product Owner
Scaling Agile and Scrum (cPrime/Angela Johnson)
Ad

Viewers also liked (12)

PPTX
Agile Mëtteg series session 7
PDF
Оформление коммерческого предложения
PPTX
Nouvelles expériences de lecture
PDF
Web usability et e-Commerce
PDF
TibcoBE-Development
PDF
How to stay positive in a tough working environment pdf
PDF
ALM and DevOps in the health industry
PDF
PEC PA&Utilities 2016 | Il caso del Portogallo
PDF
SPD Casablanca 2016 - Keynote SharePoint in a changing world
PDF
How can you influence your Board to adopt good governance of project / change...
PDF
Protéger vos données grâce à microsoft rms - Marocco SharePoint Days 2016
PDF
Melhore o seu linkedin!
Agile Mëtteg series session 7
Оформление коммерческого предложения
Nouvelles expériences de lecture
Web usability et e-Commerce
TibcoBE-Development
How to stay positive in a tough working environment pdf
ALM and DevOps in the health industry
PEC PA&Utilities 2016 | Il caso del Portogallo
SPD Casablanca 2016 - Keynote SharePoint in a changing world
How can you influence your Board to adopt good governance of project / change...
Protéger vos données grâce à microsoft rms - Marocco SharePoint Days 2016
Melhore o seu linkedin!
Ad

Similar to Agile Mëtteg series - Session 5 (20)

PDF
Sprinkle on Just Enough Process
PPTX
Agile metteg 9(agile tooling)-draft-v1.0
PDF
Campbell & Readman - TDD It's Not Tester Driven Development - EuroSTAR 2012
PDF
Agile2014 Report: As a Speaker and a Reporter of the latest Agile in the world
PDF
How to Jumpstart Enterprise Agile Adoption
PPTX
TestOps and Shift Left
PDF
Quality for DevOps teams - Quality engineering in the DevOps culture
PPT
A confused tester in agile world finalversion
PPTX
Agile Overview
PPTX
Visual Studio 2010 Agile Tools (role based)
PPTX
Agile Tool Selection
PDF
Agile metrics at-pmi bangalore
PPTX
Technology-Driven Development: Using Automation and Development Techniques to...
PPTX
TDD in Agile
PPTX
Agile2014 Report: As a Speaker and a Reporter of the latest Agile in the world
PDF
Agile testing alliance cp aat highlights 1.2
PPTX
Agile test tools
PDF
ІГОР КОШЕЛЄВ «Built-In Quality» Online QADay 2023
PPTX
Why I do not like to be a tester in Agile project?
PDF
NUS-ISS Learning Day 2016 - Improve IT Project Management and other IT Proces...
Sprinkle on Just Enough Process
Agile metteg 9(agile tooling)-draft-v1.0
Campbell & Readman - TDD It's Not Tester Driven Development - EuroSTAR 2012
Agile2014 Report: As a Speaker and a Reporter of the latest Agile in the world
How to Jumpstart Enterprise Agile Adoption
TestOps and Shift Left
Quality for DevOps teams - Quality engineering in the DevOps culture
A confused tester in agile world finalversion
Agile Overview
Visual Studio 2010 Agile Tools (role based)
Agile Tool Selection
Agile metrics at-pmi bangalore
Technology-Driven Development: Using Automation and Development Techniques to...
TDD in Agile
Agile2014 Report: As a Speaker and a Reporter of the latest Agile in the world
Agile testing alliance cp aat highlights 1.2
Agile test tools
ІГОР КОШЕЛЄВ «Built-In Quality» Online QADay 2023
Why I do not like to be a tester in Agile project?
NUS-ISS Learning Day 2016 - Improve IT Project Management and other IT Proces...

More from Agile Partner S.A. (20)

PDF
Domain-Driven Design: From strategic business goals to software implementation
PDF
Devops: la réunion des co-propriétaires
PDF
Découverte de l'esprit agile
PPTX
Comment intégrer au plus tôt l’utilisateur dans le développement d’une applic...
PDF
Agilité : la voix de la collaboration
PDF
Market validation (by Sylvain Chery)
PPT
Agile Brown Bag: Gouvernance SharePoint
PDF
Agile Mëtteg Septembre 2015: Introduction à DevOps
PDF
Agile Brown Bag - Vagrant & Docker: Introduction
PPTX
Introduction to agile methods
PPTX
Retour d expérience_sur_l_agilité
PPTX
Continuous innovation with Lean Startup
PPTX
Agile testing games
PPTX
Coding Dojo
PDF
Lkfr12 - De Scrum à Kanban
PPTX
Maîtriser et controler vos projets Agile
PPTX
Kanban: going Lean/Agile for your IT dev. & support team
PPTX
It job day Henam 2011-06-20
PDF
Agility, a mature approach, the fruit of more than 30 years research
PDF
L’Agilité à l’état mûr ou le fruit de plus de 30 ans de réflexion
Domain-Driven Design: From strategic business goals to software implementation
Devops: la réunion des co-propriétaires
Découverte de l'esprit agile
Comment intégrer au plus tôt l’utilisateur dans le développement d’une applic...
Agilité : la voix de la collaboration
Market validation (by Sylvain Chery)
Agile Brown Bag: Gouvernance SharePoint
Agile Mëtteg Septembre 2015: Introduction à DevOps
Agile Brown Bag - Vagrant & Docker: Introduction
Introduction to agile methods
Retour d expérience_sur_l_agilité
Continuous innovation with Lean Startup
Agile testing games
Coding Dojo
Lkfr12 - De Scrum à Kanban
Maîtriser et controler vos projets Agile
Kanban: going Lean/Agile for your IT dev. & support team
It job day Henam 2011-06-20
Agility, a mature approach, the fruit of more than 30 years research
L’Agilité à l’état mûr ou le fruit de plus de 30 ans de réflexion

Recently uploaded (20)

PPT
Teaching material agriculture food technology
PDF
Empathic Computing: Creating Shared Understanding
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Cloud computing and distributed systems.
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Machine learning based COVID-19 study performance prediction
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
KodekX | Application Modernization Development
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
cuic standard and advanced reporting.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Approach and Philosophy of On baking technology
PDF
Review of recent advances in non-invasive hemoglobin estimation
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Teaching material agriculture food technology
Empathic Computing: Creating Shared Understanding
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Advanced methodologies resolving dimensionality complications for autism neur...
MYSQL Presentation for SQL database connectivity
Cloud computing and distributed systems.
Spectral efficient network and resource selection model in 5G networks
Machine learning based COVID-19 study performance prediction
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
KodekX | Application Modernization Development
Network Security Unit 5.pdf for BCA BBA.
Chapter 3 Spatial Domain Image Processing.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
cuic standard and advanced reporting.pdf
Encapsulation theory and applications.pdf
Approach and Philosophy of On baking technology
Review of recent advances in non-invasive hemoglobin estimation
The AUB Centre for AI in Media Proposal.docx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton

Agile Mëtteg series - Session 5

  • 1. Agile testingAgile Mëtteg – 15 July 2010
  • 2. Agile Mëtteg in 2010Complete Agile Mëtteg calendar onwww.agilepartner.net/agility_seminars.html15 July 2010Agile Mëtteg - Agile Testing2
  • 3. OBJECTIVES & AGENDAObjectivesThis session will focus on a Agile Testing and provide you with practical examples and techniques to help your team understand what is behind this approach.AgendaIntroduction of Agile PartnerThe attendeesWhat is agile testing? And why? And how? Unit testing Behaviour Driven Development Test Driven Development Acceptance testing Q&A 15 July 2010Agile Mëtteg - Agile Testing3
  • 4. AGILE PARTNER SERVICES15 July 2010Agile Mëtteg - Agile testing4IS users Services1Custom Software Development & MaintenanceOur core business to answer customer needsIS servicesThanks to our expertise we can support IT team to reach their productivity & quality objectives (Assessment, Coaching, Support, Training, Resource delegation…)IS SolutionsTake benefit from commercial or Open Source platform to answer as quick as possible to specific needsIS users servicesWe can support Product & Services owners to work closely with the IT team (Assessment, Coaching, Support, Training, Resource delegation…)4Software Development & SoftwareMaintenance2ISSolutionsIS ServicesAgilityAgility31234Agility
  • 5. NEXT TRAININGS & CERTIFICATIONS15 July 2010Agile Mëtteg - Agile testing5-15%Complete calendar on: http://www.agilepartner.net/training/training_calendar.html
  • 6. Let’s get acquaintedJuly 15th, 2010Agile Mëtteg – Agile Testing6
  • 7. PRESENTATION OF THE ATTENDEESWho are you ?What is your role ?What do you know about agility ?What are your expectations ?July 15th, 2010Agile Mëtteg – Agile Testing7
  • 8. AGENDAAgendaWhat is agile testing? And why? And how?Unit testingTest Driven DevelopmentAcceptance testingBehaviour Driven Development15 July 2010Agile Mëtteg - Agile testing8
  • 9. WHAT IS SOFTWARE TESTING?Definition:Software testing is an investigation conducted to provide stakeholders with information about the quality of the product or service under test.(Wikipedia)15 July 2010Agile Mëtteg - Agile testing9
  • 10. WHAT IS SOFTWARE TESTING?Definition:Software testing is a way to measure the quality of the product using tests.(Stephan Zimmer & Eric Ferrot)15 July 2010Agile Mëtteg - Agile testing10
  • 11. MEASURING QUALITYMeasuring quality using tests:tests to find defectsfunctional / non-functional testinga LOT of kinds of tests15 July 2010Agile Mëtteg - Agile testing11
  • 12. 15 July 2010Agile Mëtteg - Agile testing12SO WHAT IS AGILE TESTING ?… AND WHY?… AND HOW?
  • 13. Traditional / Waterfall approachTesting is done after the developmentWHAT IS AGILE TESTING?15 July 2010Agile Mëtteg - Agile testing13
  • 14. Agile approachTesting is part of the development processWHAT IS AGILE TESTING?15 July 2010Agile Mëtteg - Agile testing14Iteration 1Iteration 2Iteration nNo specific order
  • 15. WHAT IS AGILE TESTING?15 July 2010Agile Mëtteg - Agile testing15ProgrammerTraditional / Waterfall approachTesting is done after the developmentClear separation of rolesDomain ExpertTester
  • 16. Agile approachTesting is part of the development processA whole teamWHAT IS AGILE TESTING?15 July 2010Agile Mëtteg - Agile testing16ProgrammerProgrammerDomain ExpertTesterTester
  • 17. Agile testing places an increased portion of the testing in the hands of the developersWait… WHAT?!?!I’m a programmer not a testerIt’s trivial I don’tneed a testI don’t have time for testingMy code isverydifficult to testWHAT IS AGILE TESTING?15 July 2010Agile Mëtteg - Agile testing17
  • 18. WHY AGILE TESTING?WHY should developers write tests?Fear / ConfidenceDo you dare to change the code?  Tests = safety netIt places developers as users  Better usabilityIt makes the code testable  Better design15 July 2010Agile Mëtteg - Agile testing18
  • 19. WHY AGILE TESTING?A better design“How good the design is doesn't matter near as much as whether the design is getting better or worse. If it is getting better, day by day, I can live with it forever. If it is getting worse, I will die.”(Kent Beck )15 July 2010Agile Mëtteg - Agile testing19
  • 20. AGILE TESTING… HOW?Agile testing… HOW?Unit testingTest Driven DevelopmentAcceptance testingBehaviour Driven Development15 July 2010Agile Mëtteg - Agile testing20
  • 21. BUT FIRST…15 July 2010Agile Mëtteg - Agile testing21
  • 22. LET US INTRODUCE YOU TO…15 July 2010Agile Mëtteg - Agile testing22TIME MASTER TIM!
  • 23. AGILE TESTING… HOW?DINO LEGSA real projectA new feature: „The Crystal Quest“15 July 2010Agile Mëtteg - Agile testing23http://dinolegs.blogspot.com/
  • 24. UNIT TESTING15 July 2010Agile Mëtteg - Agile testing24
  • 25. UNIT TESTINGDefinitionsUnit : Smallest testable part of an applicationUnit test : A method to test a unit15 July 2010Agile Mëtteg - Agile testing25
  • 26. UNIT TESTINGSome bad things about unit tests:Expensive to write and expensive to maintainYou can test too muchYou can test the wrong thingsPossibility to get false sense of security when all tests passNo integration tests15 July 2010Agile Mëtteg - Agile testing26
  • 27. UNIT TESTINGWhy write unit tests?More confidence in the codeAvoid regressionTests themselves are documentationEncourages better software design: minimal interfaces and modularity 15 July 2010Agile Mëtteg - Agile testing27
  • 28. UNIT TESTINGThe „3A“ patternArrangeActAssert15 July 2010Agile Mëtteg - Agile testing28
  • 29. UNIT TESTINGF.I.R.S.T.FastIndependentRepeatableSelf-ValidatingTimely[Clean Code – Robert C. Martin]15 July 2010Agile Mëtteg - Agile testing29
  • 30. UNIT TESTING„The act of writing a unit test is more an act of design than of verification“(Robert C. Martin)15 July 2010Agile Mëtteg - Agile testing30
  • 31. UNIT TESTINGA lot of existing unit testing… xUnit (NUnit, Junit, csUnit, …), MSTest, Pex, Visual Studio UTF, etc.…and mocking frameworks Moq, Rhino Mocks, Moles, TypeMock, JMock, etc.15 July 2010Agile Mëtteg - Agile testing31
  • 32. TEST DRIVEN DEVELOPMENT (TDD)15 July 2010Agile Mëtteg - Agile testing32
  • 33. TEST DRIVEN DEVELOPMENT (TDD)15 July 2010Agile Mëtteg - Agile testing33Unit TestWhat is TDD? Difference to unit testingWrite the unit testCodeFIRST!
  • 34. TEST DRIVEN DEVELOPMENT (TDD)What is TDD? Difference to unit testingWrite the unit test FIRST!« Red – Green – Refactor » pattern15 July 2010Agile Mëtteg - Agile testing34
  • 35. TEST DRIVEN DEVELOPMENT (TDD)Red – Green – RefactorMake it failwrite the test firstMake it workwrite the simplest implementationMake it betterrefactor without changing the behavior15 July 2010Agile Mëtteg - Agile testing35
  • 36. TEST DRIVEN DESIGN (TDD)TDD is not only about testingAlso called Test Driven DesignTDD is a methodology that helps creating a good design when developing code. 15 July 2010Agile Mëtteg - Agile testing36
  • 37. TEST DRIVEN DESIGN (TDD)TDD is not only about testingAlso called Test Driven DesignTDD consequencesYAGNIDRYLaw of DemeterSingle responsibility principleInterface segregation principleInversion of control15 July 2010Agile Mëtteg - Agile testing37GOOD DESIGN !
  • 38. TEST DRIVEN DEVELOPMENT (TDD)DEMO15 July 2010Agile Mëtteg - Agile testing38
  • 39. ACCEPTANCE TESTING15 July 2010Agile Mëtteg - Agile testing39
  • 40. ACCEPTANCE TESTINGUnit testing tells us that the code is meeting the programmer‘s expectationsUnit testing is essential but not sufficientAcceptance tests are specifications for thedesired behaviour and functionality of a system.Customer orientedAbout the what and not the howUsually black box system testsIntegration tests character15 July 2010Agile Mëtteg - Agile testing40
  • 41. ACCEPTANCE TESTINGImplementing acceptance tests means automationExamples of automation tools:Framework for Integrated Test (Fit) is an open-source tool for automated acceptance testFitnesse is a webserver, a wiki and an automated testing tool based on Fit15 July 2010Agile Mëtteg - Agile testing41
  • 42. ACCEPTANCE TESTINGDEMO15 July 2010Agile Mëtteg - Agile testing42
  • 43. BEHAVIOUR DRIVEN DEVELOPMENT (BDD)15 July 2010Agile Mëtteg - Agile testing43
  • 44. BEHAVIOUR DRIVEN DEVELOPMENTBehaviour Driven Development (BDD)Evolution of TDD introduced by Dan NorthUsing terminology focused on the behavioural aspects of the system rather than testing Unit ≠ behaviour  Focus on why the code should be created Business value > Code Specification > Test15 July 2010Agile Mëtteg - Agile testing44
  • 45. BEHAVIOUR DRIVEN DEVELOPMENTOutside-in methodology  from the known to the unknownHelps the developer to think YAGNI  Leads to better design  BDD = Behaviour Driven DesignDon‘t forget about the roots (TDD)  Red – Green – Refactor15 July 2010Agile Mëtteg - Agile testing45
  • 46. BEHAVIOUR DRIVEN DEVELOPMENTProgrammerUbiquitous languagebased on the business domainCommon vocabulary between participantsMinimizes translationAvoids miscommunicationMakes it easier to validate earlyDomain ExpertTester15 July 2010Agile Mëtteg - Agile testing46
  • 47. BEHAVIOUR DRIVEN DEVELOPMENTStory frameworkEach feature is captured in a „story“, which defines the scope of the feature along with its acceptance criteriaFeatureFeature: TitleAs a [role]I want [feature]so that [benefit]Feature: Crystal questAs a playerI want to collect time crystalsso that I am able to complete the crystal quest15 July 2010Agile Mëtteg - Agile testing47
  • 48. BEHAVIOUR DRIVEN DEVELOPMENTScenario / Acceptance criteriaScenario:TitleGiven some initial context,And some additional context,When an event occurs,Then ensure some outcomesScenario 1:Tim loses a crystalGiven a Tim is on screenAnd a crystal is on screen,When Tim dies,Then the crystal disappearsAnd Tim‘s player score is decreased by 20Scenario 2:Tim collects a crystalGiven Tim is on screenAnd a crystal is on screen,When Tim touches the crystal,Then the crystal disappearsAnd a nice music is playedAnd Tim‘s player score is increased by 10015 July 2010Agile Mëtteg - Agile testing48
  • 49. BEHAVIOUR DRIVEN DEVELOPMENTSeveral existing tools for automationJBehave, NBehave, JSpec, NSpec, CppSpec, PHPSpec, SpecFlow, RSpec, Cucumber, …  Executable specification  Quick feedback and regression testing  Requirements are tests  Tests are documentation15 July 2010Agile Mëtteg - Agile testing49
  • 50. BEHAVIOUR DRIVEN DEVELOPMENTDEMO15 July 2010Agile Mëtteg - Agile testing50
  • 51. SUMMARY15 July 2010Agile Mëtteg - Agile testing51
  • 52. SUMMARYSome things to remember about Agile Testing:Testing is part of the development processWhole-team approach: roles not that strictly separated as in traditional approachBuilding a testable architecture leads to a better design... and don‘t forget!Setup a working environment15 July 2010Agile Mëtteg - Agile testing52
  • 53. QUESTIONS53Agile Mëtteg - Agile testing15 July 2010
  • 54. NEXT TRAININGS & CERTIFICATIONS15 July 2010Agile Mëtteg - Agile testing54Complete calendar on: http://www.agilepartner.net/training/training_calendar.html
  • 55. RESOURCESAgile Partner: www.agilepartner.netAgile Interest Group Luxembourg:www.aiglu.orgAgile Alliance: www.agilealliance.orgScrum alliance: www.scrumalliance.orgScrum.org15 July 2010Agile Mëtteg - Agile testing55
  • 56. CONTACTSThank You15 July 2010Agile Mëtteg - Agile testing56

Editor's Notes

  • #2: GFA
  • #5: GFA
  • #9: ERF/SZ
  • #10: ERF
  • #11: ERF
  • #12: ERF
  • #13: ERF
  • #14: ERF
  • #15: ERF
  • #16: ERF
  • #17: ERF
  • #18: ERF(+SZ)
  • #19: ERF
  • #20: ERF
  • #21: ERF
  • #22: ERF
  • #23: ERF
  • #24: ERF
  • #25: SZ
  • #26: SZThe goal of unit testing is to isolate each part of the program and show that the individual parts are correct.Unit tests find problems early in the development cycle.A unit test provides a strict, written contract that the piece of code must satisfy. As a result, it affords several benefits.
  • #27: SZ
  • #28: SZMore confidence in the codeAvoid regression: If tests are run frequently the developer can see when new code breaks old code.The tests themselves are documentationEncourages better software design: simpler, smaller methods; less coupling instead of strongly coupled code[Compare introduction, maybe too similar?]
  • #29: SZPrinciples for unit testsIt’s much easier to see:What is being set up and initialized in the arrange section What method is being executed in the act section What determines the outcome of the test in the assert section
  • #30: SZ
  • #31: SZOriginated in XP.Unit tests are essential parts of XP and other agile methods.
  • #32: SZ
  • #33: ERF
  • #34: ERF
  • #35: ERF
  • #36: ERF
  • #37: ERF
  • #38: ERF
  • #39: ERF
  • #40: SZ
  • #41: SZAcceptance tests are specifications for the desired behavior and functionality of a system. WHY?Although acceptance testing traditionally takes place at the end of development or major milestones, in agile software development acceptance testing needs to be performed at the user story level. There are several reasons for why this is important:A passed test case becomes a measure of completeness of a user story; that is, a user story cannot be considered complete till it has passed all acceptance tests associated with it. Even though there is thorough unit testing performed, this is not enough. Unit tests, by their nature, test for a localized used case and are not concerned about the overall system. When we have iterations longer than a couple of weeks, it becomes easy to loose focus on initial agreements; acceptance test cases made for each story at the beginning of each iteration help the developers to keep things within the expectations. Acceptance test cases can serve as an excellent guide to developers to better interpret the requirements from a user story
  • #42: SZFit – the engineThe customers' examples are formatted in tables and saved as HTML using ordinary business tools such as Microsoft Excel. When Fit checks the document, it creates a copy and colors the tables green, red, and yellow according to whether the software behaved as expected. Fitnesse – Also the wiki on topFitNesse allows users of a developed system to enter specially formatted input (its format is accessible to non-programmers). This input is interpreted and tests are created automatically. These tests are then executed by the system and output is returned back to the user. The advantage of this approach is very fast feedback from users. The developer of the system to be tested needs to provide some support (classes named "fixtures", conforming to certain conventions). fast user feedbackERF demo -> score computation dino legs
  • #43: ERF
  • #44: SZI
  • #45: SZBehavior-driven developmentBDD aims to help focus on the delivery of prioritised, verifiable business value by providing a common vocabularyBy using terminology focused on the behavioural aspects of the system rather than testing, BDD attempts to help direct developers towards a focus on the real value to be found in TDD at its most successful. "Behavior-driven development is what you are doing already, if you are doing Test-driven development well." (Dave Astels)Behavior Driven Development is more about interactions with the application than just unit testing. It forces the developer to understand the responsibility of the method he is about to write. Using good tools, the specs written to test the application can be used as specifications. Doing what comes naturallyBDD isn't anything new or revolutionary. It's just an evolutionary offshoot of TDD in which the word "test" is replaced by the word "should." Semantics aside, many people find the concept of should a much more natural development driver than the concept of testing. Thinking in terms of behavior (shoulds) somehow paves the way into writing specification classes first, which, in turn, can be a very efficient implementation driver.For many developers, the shift from test-driven development to BDD is a smart move. With BDD, you don't have to think about tests, you can just pay attention to the requirements of your application and ensure that the application behavior does what it should to meet those requirements. Using BDD to drive development Behavior driven development (BDD) is an evolutionary result of test driven development (TDD) in the sense that rather than thinking in terms of tests (which have the tendency to make you think after the fact) you can more easily think in terms of a specification. By thinking about an application’s specification or behavior, it becomes easier to validate things early– in fact, when thinking in terms of a specification, it becomes quite easy to write things upfront.
  • #46: SZ
  • #47: SZBDD relies on the use of a very specific (and small) vocabulary to minimize miscommunication and to ensure that everyone – the business, developers, testers, analysts and managers – are not only on the same page but using the same words. BDD provides a “ubiquitous language” for analysis Around this time, Eric Evans published his bestselling book Domain-Driven Design. In it, he describes the concept of modeling a system using a ubiquitous language based on the business domain, so that the business vocabulary permeates right into the codebase.
  • #48: SZIStructural templatesFeature:As a [X]I want [Y]so that [Z] (In order)The template had to be loose enough that it wouldn’t feel artificial or constraining to analysts but structured enough that we could break the story into its constituent fragments and automate them. We started describing the acceptance criteria in terms of scenarios, which took the following form:Scenarios:Given some initial context (the givens),When an event occurs,then ensure some outcomes.
  • #49: SZIStructural templatesFeature:As a [X]I want [Y]so that [Z] (In order)The template had to be loose enough that it wouldn’t feel artificial or constraining to analysts but structured enough that we could break the story into its constituent fragments and automate them. We started describing the acceptance criteria in terms of scenarios, which took the following form:Scenarios:Given some initial context (the givens),When an event occurs,then ensure some outcomes.
  • #50: SZI
  • #51: ERF
  • #52: SZI
  • #53: SZI