View
3.267
Download
0
Category
Preview:
Citation preview
Agile Mëtteg – 15 July 2010Agile testing
Agile Mëtteg in 2010
Complete Agile Mëtteg calendar onwww.agilepartner.net/agility_seminars.html
15 July 2010 Agile Mëtteg - Agile Testing 2
OBJECTIVES & AGENDA
ObjectivesThis 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 2010 Agile Mëtteg - Agile Testing 3
AGILE PARTNER SERVICES
Custom Software Development & Maintenance
Our core business to answer customer needs
IS 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 needs
IS users servicesWe can support Product & Services owners to work closely with the IT team (Assessment, Coaching, Support, Training, Resource delegation…)
15 July 2010 Agile Mëtteg - Agile testing 4
IS users Servic
es
Software Developme
nt & Software
Maintenance
ISSolutio
ns
IS Servic
es1 23
41
3
2
4
Certifications Duration Date
Certified Scrum Product Owner
2 days 16 Nov. 2010
Certified Scrum Master 2 days 2011 (TBD)
NEXT TRAININGS & CERTIFICATIONS
Courses Duration
July August
Sept.
Agile methods 1 day 12 16 13
Scrum 2 days 13 17 14
Usine logicielle 3 days - 23 -
15 July 2010 Agile Mëtteg - Agile testing 5
Complete calendar on: http://www.agilepartner.net/training/training_calendar.html
-15%
LET’S GET ACQUAINTED
July 15th, 2010 Agile Mëtteg – Agile Testing 6
PRESENTATION OF THE ATTENDEES
Who are you ?What is your role ?What do you know about agility ?What are your expectations ?
July 15th, 2010 Agile Mëtteg – Agile Testing 7
AGENDA
AgendaWhat is agile testing? And why? And how?Unit testingTest Driven DevelopmentAcceptance testingBehaviour Driven Development
15 July 2010 Agile Mëtteg - Agile testing 8
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 2010 Agile Mëtteg - Agile testing 9
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 2010 Agile Mëtteg - Agile testing 10
MEASURING QUALITY
Measuring quality using tests:tests to find defectsfunctional / non-functional testinga LOT of kinds of tests
15 July 2010 Agile Mëtteg - Agile testing 11
15 July 2010 Agile Mëtteg - Agile testing 12
SO WHAT IS AGILE TESTING ?
… AND WHY?
… AND HOW?
Traditional / Waterfall approachTesting is done after the development
Requirements Analysis Design Developmen
t Test Release
WHAT IS AGILE TESTING?
15 July 2010 Agile Mëtteg - Agile testing 13
Agile approachTesting is part of the development process
WHAT IS AGILE TESTING?
15 July 2010 Agile Mëtteg - Agile testing 14
Iteration 1Requiremen
tsAnalysis
DesignDevelopme
ntTest
Release
Iteration 2Requiremen
tsAnalysis
DesignDevelopme
ntTest
Release
Iteration nRequiremen
tsAnalysis
DesignDevelopme
ntTest
Release
No specific order
Traditional / Waterfall approachTesting is done after the developmentClear separation of roles
WHAT IS AGILE TESTING?
15 July 2010 Agile Mëtteg - Agile testing 15
Programmer
Domain Expert
Tester
Agile approachTesting is part of the development processA whole team
WHAT IS AGILE TESTING?
15 July 2010 Agile Mëtteg - Agile testing 16
Programmer
Domain Expert
Tester
Programmer
Tester
Agile testing places an increased portion of the testing in the hands of the developers
Wait… WHAT?!?!I’m a programmer not a testerIt’s trivial I don’t need a testI don’t have time for testingMy code is very difficult to test
WHAT IS AGILE TESTING?
15 July 2010 Agile Mëtteg - Agile testing 17
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 design
15 July 2010 Agile Mëtteg - Agile testing 18
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 2010 Agile Mëtteg - Agile testing 19
AGILE TESTING… HOW?
Agile testing… HOW?
Unit testingTest Driven DevelopmentAcceptance testingBehaviour Driven Development
15 July 2010 Agile Mëtteg - Agile testing 20
BUT FIRST…
15 July 2010 Agile Mëtteg - Agile testing 21
LET US INTRODUCE YOU TO…
15 July 2010 Agile Mëtteg - Agile testing 22
TIME MASTER TIM!
AGILE TESTING… HOW?
DINO LEGSA real projectA new feature:
„The Crystal Quest“
15 July 2010 Agile Mëtteg - Agile testing 23
http://dinolegs.blogspot.com/
UNIT TESTING
15 July 2010 Agile Mëtteg - Agile testing 24
UNIT TESTING
Definitions
Unit : Smallest testable part of an application
Unit test : A method to test a unit
15 July 2010 Agile Mëtteg - Agile testing 25
UNIT TESTING
The „3A“ pattern
ArrangeAct
Assert
15 July 2010 Agile Mëtteg - Agile testing 28
UNIT TESTING
F.I.R.S.T.
FastIndependentRepeatable
Self-ValidatingTimely
[Clean Code – Robert C. Martin]
15 July 2010 Agile Mëtteg - Agile testing 29
UNIT TESTING
„The act of writing a unit test is more an act of design than of
verification“(Robert C. Martin)
15 July 2010 Agile Mëtteg - Agile testing 30
TEST DRIVEN DEVELOPMENT (TDD)
15 July 2010 Agile Mëtteg - Agile testing 32
TEST DRIVEN DEVELOPMENT (TDD)
What is TDD? Difference to unit testing Write the unit test
15 July 2010 Agile Mëtteg - Agile testing 33
Unit TestCode
FIRST!
TEST DRIVEN DEVELOPMENT (TDD)
Red – Green – Refactor
Make it failwrite the test firstMake it workwrite the simplest implementationMake it betterrefactor without changing the behavior
15 July 2010 Agile Mëtteg - Agile testing 35
Test
CodeRefactor
TEST DRIVEN DESIGN (TDD)
TDD is not only about testingAlso called Test Driven Design
TDD is a methodology that helps creating a good design when
developing code.
15 July 2010 Agile Mëtteg - Agile testing 36
TEST DRIVEN DESIGN (TDD)
TDD is not only about testingAlso called Test Driven Design
TDD consequencesYAGNIDRYLaw of DemeterSingle responsibility principleInterface segregation principleInversion of control
15 July 2010 Agile Mëtteg - Agile testing 37
GO
OD
DES
IGN
!
TEST DRIVEN DEVELOPMENT (TDD)
DEMO
15 July 2010 Agile Mëtteg - Agile testing 38
ACCEPTANCE TESTING
15 July 2010 Agile Mëtteg - Agile testing 39
ACCEPTANCE TESTING
Unit testing tells us that the code is meeting the programmer‘s expectationsUnit testing is essential but not sufficient
Acceptance tests are specifications for the
desired behaviour and functionality of a system.
Customer orientedAbout the what and not the howUsually black box system testsIntegration tests character15 July 2010 Agile Mëtteg - Agile testing 40
ACCEPTANCE TESTING
Implementing acceptance tests means automation
Examples 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 Fit
15 July 2010 Agile Mëtteg - Agile testing 41
ACCEPTANCE TESTING
DEMO
15 July 2010 Agile Mëtteg - Agile testing 42
BEHAVIOUR DRIVEN DEVELOPMENT (BDD)
15 July 2010 Agile Mëtteg - Agile testing 43
BEHAVIOUR DRIVEN DEVELOPMENT
Behaviour 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 > Test
15 July 2010 Agile Mëtteg - Agile testing 44
BEHAVIOUR DRIVEN DEVELOPMENT
Outside-in methodology from the known to the unknown
Helps the developer to think YAGNI Leads to better design BDD = Behaviour Driven Design
Don‘t forget about the roots (TDD) Red – Green – Refactor
15 July 2010 Agile Mëtteg - Agile testing 45
BEHAVIOUR DRIVEN DEVELOPMENT
Ubiquitous language based on the business domain
Common vocabulary between participantsMinimizes translationAvoids miscommunicationMakes it easier to validate early
15 July 2010 Agile Mëtteg - Agile testing 46
Domain Expert
Programmer
Tester
BEHAVIOUR DRIVEN DEVELOPMENT
Story frameworkEach feature is captured in a „story“, which defines the scope of the feature along with its acceptance criteria
Feature
15 July 2010 Agile Mëtteg - Agile testing 47
Feature: TitleAs a [role]I want [feature]so that [benefit] Feature: Crystal quest
As a playerI want to collect time crystalsso that I am able to complete the crystal quest
BEHAVIOUR DRIVEN DEVELOPMENT
Scenario / Acceptance criteria
15 July 2010 Agile Mëtteg - Agile testing 48
Scenario: TitleGiven some initial context,And some additional context,When an event occurs,Then ensure some outcomes
Scenario 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 20
Scenario 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 100
BEHAVIOUR DRIVEN DEVELOPMENT
Several existing tools for automationJBehave, NBehave, JSpec, NSpec, CppSpec, PHPSpec, SpecFlow, RSpec, Cucumber, …
Executable specification Quick feedback and regression testing Requirements are tests Tests are documentation
15 July 2010 Agile Mëtteg - Agile testing 49
BEHAVIOUR DRIVEN DEVELOPMENT
DEMO
15 July 2010 Agile Mëtteg - Agile testing 50
SUMMARY
15 July 2010 Agile Mëtteg - Agile testing 51
SUMMARY
Some 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 environment
15 July 2010 Agile Mëtteg - Agile testing 52
QUESTIONS
53Agile Mëtteg - Agile testing15 July 2010
Certifications Duration Date
Certified Scrum Product Owner
2 days 16 Nov. 2010
Certified Scrum Master 2 days 2011 (TBD)
NEXT TRAININGS & CERTIFICATIONS
Courses Duration
May June July
Agile methods 1 day 17 1 12Scrum 2 days 18 2 13eXtreme Programming
2 days 6 - 8
Scrum Advanced 1 day 20 4 15Scrum Product Owner
2 days - - 1
15 July 2010 Agile Mëtteg - Agile testing 54
Complete calendar on: http://www.agilepartner.net/training/training_calendar.html
RESOURCES
Agile Partner: www.agilepartner.net
Agile Interest Group Luxembourg: www.aiglu.org
Agile Alliance: www.agilealliance.org Scrum alliance: www.scrumalliance.org Scrum.org
15 July 2010 Agile Mëtteg - Agile testing 55
CONTACTS
Thank You
15 July 2010 Agile Mëtteg - Agile testing 56
EricFERROT
Stephan ZIMMER
Senior Software Engineer
Software Engineer / CSM
eferrot@agilepartner.net szimmer@agilepartner.net
Recommended