SlideShare una empresa de Scribd logo
1 de 43
A Simple Intro To
quick
questions
to start!
had a client who
knew what he
needed?
question 1
been in a project
with no change in
requirements?
question 2
predicted every
problem 3 months
in advance?
question 3
Agile Context
of Testing
respond to change!
A
B
A
B
C
change
risk
reduce the risk!
reduce the risk!
use the
agile
iterative
cycle
reduce the risk!
test
continuously
fast feedback
know what works at
any given moment
Types of Tests
Functional Tests
Examples
Story Tests
Prototypes
Simulations
Unit Tests
Component Tests
Exploratoy Testing
Scenarios
Usability Testing
UAT
A/B
Performance & Load Testing
Security Testing
“ility Testing”
Automated
& Manual
Automated
Manual
Tools
Q2 Q3
Q1 Q4
Business Facing
Technology Facing
SupportingtheTeam
CritiqueProduct
Functional Tests
Examples
Story Tests
Prototypes
Simulations
Unit Tests
Component Tests
Exploratoy Testing
Scenarios
Usability Testing
UAT
A/B
Performance & Load Testing
Security Testing
“ility Testing”
Automated
& Manual
Automated
Manual
Tools
Q2 Q3
Q1 Q4
Business Facing
Technology Facing
SupportingtheTeam
CritiqueProduct
Coding
Unit Testing
Program Unit
Design
Physical Design
Logical Design
User
Requirements
Integration
Testing
System Testing
Acceptance
Testing
Verifies
Verifies
Verifies
Verifies
hard
expensive
slow
easy
cheap
fast
more
less
UI
Integration
Unit
What Is A
Unit Test?
Unit Tests
• Tests a single unit of code (typically a method)
• Tests the unit of code in ISOLATION
• Tests that the code behaves as expected
Unit Tests
• It’s still code
• Code that tests code
• Exercise SUT, check behaviour
• Concepts: Test Class, Test Method
Test Structure
ARRANGE ACT ASSERT
Test Structure
ARRANGE
ACT
ASSERT
Unit Tests
• Should be fast (< 10 ms)
• Should be consistent (same result always)
• Should run in memory (no db, file access)
• Should run in any order (no dependencies on other
tests)
Impacts
• Fast Feedback
• Cleaner design
• Code and componente decoupling
• Confidence
• Executable documentation, with usage samples
• Reduce regression
TDD vs.
Unit Testing
unit testing
is not
TDD
TDD
is
unit testing
(in a particular order)
TDD in
three
steps
TDD is
different approach
to coding
Demo
https://github.com/MiguelAlho/TddCalculator
References
Books
• Pragmatic Unit Testing In C# with Nunit
• Growing software guided by tests
• The art of unit Testing
• Testable Javascript
• Quality Code
• Xunit Patterns
Tdd01 a simple intro to tdd

Más contenido relacionado

La actualidad más candente

Let's review it: What designers can learn from (code) review
Let's review it: What designers can learn from (code) reviewLet's review it: What designers can learn from (code) review
Let's review it: What designers can learn from (code) reviewIda Aalen
 
Vladimir Lozanov How to deliver high quality apps to the app store
Vladimir Lozanov	How to deliver high quality apps to the app storeVladimir Lozanov	How to deliver high quality apps to the app store
Vladimir Lozanov How to deliver high quality apps to the app storeАліна Шепшелей
 
Agile Testing - presentation for Agile User Group
Agile Testing - presentation for Agile User GroupAgile Testing - presentation for Agile User Group
Agile Testing - presentation for Agile User Groupsuwalki24.pl
 
V model in software testing
V model in software testingV model in software testing
V model in software testingAbdullah Al Rumy
 
7 QA Tests You Should Be Running
7 QA Tests You Should Be Running7 QA Tests You Should Be Running
7 QA Tests You Should Be RunningRainforest QA
 
Quality Assurance
Quality Assurance Quality Assurance
Quality Assurance Puchpa Oks
 
Test automation and Agile software development
Test automation and Agile software developmentTest automation and Agile software development
Test automation and Agile software developmentBas Dijkstra
 
The Essentials Of Test Driven Development
The Essentials Of Test Driven Development The Essentials Of Test Driven Development
The Essentials Of Test Driven Development Rock Interview
 
#TesterbhiCoder - Every Tester should get into coding - Selenium automation
#TesterbhiCoder - Every Tester should get into coding - Selenium automation#TesterbhiCoder - Every Tester should get into coding - Selenium automation
#TesterbhiCoder - Every Tester should get into coding - Selenium automationAgile Testing Alliance
 
Gamification in outsourcing company: experience report.
Gamification in outsourcing company: experience report.Gamification in outsourcing company: experience report.
Gamification in outsourcing company: experience report.Mikalai Alimenkou
 
Automated Testing with Agile
Automated Testing with AgileAutomated Testing with Agile
Automated Testing with AgileKen McCorkell
 
Why Automated Testing Matters To DevOps
Why Automated Testing Matters To DevOpsWhy Automated Testing Matters To DevOps
Why Automated Testing Matters To DevOpsdpaulmerrill
 
DevLabs Alliance Top 20 Software Testing Interview Questions for SDET - by De...
DevLabs Alliance Top 20 Software Testing Interview Questions for SDET - by De...DevLabs Alliance Top 20 Software Testing Interview Questions for SDET - by De...
DevLabs Alliance Top 20 Software Testing Interview Questions for SDET - by De...DevLabs Alliance
 
Agile testing - Reducing time to Market
Agile testing - Reducing time to MarketAgile testing - Reducing time to Market
Agile testing - Reducing time to MarketManoj K G
 
Amalgamation of BDD, parallel execution and mobile automation
Amalgamation of BDD, parallel execution and mobile automationAmalgamation of BDD, parallel execution and mobile automation
Amalgamation of BDD, parallel execution and mobile automationAgile Testing Alliance
 
End-to-End Test Automation for Both Horizontal and Vertical Scale
End-to-End Test Automation for Both Horizontal and Vertical ScaleEnd-to-End Test Automation for Both Horizontal and Vertical Scale
End-to-End Test Automation for Both Horizontal and Vertical ScaleErdem YILDIRIM
 

La actualidad más candente (20)

Let's review it: What designers can learn from (code) review
Let's review it: What designers can learn from (code) reviewLet's review it: What designers can learn from (code) review
Let's review it: What designers can learn from (code) review
 
Presentation_TDD
Presentation_TDDPresentation_TDD
Presentation_TDD
 
Vladimir Lozanov How to deliver high quality apps to the app store
Vladimir Lozanov	How to deliver high quality apps to the app storeVladimir Lozanov	How to deliver high quality apps to the app store
Vladimir Lozanov How to deliver high quality apps to the app store
 
Agile Testing - presentation for Agile User Group
Agile Testing - presentation for Agile User GroupAgile Testing - presentation for Agile User Group
Agile Testing - presentation for Agile User Group
 
V model in software testing
V model in software testingV model in software testing
V model in software testing
 
7 QA Tests You Should Be Running
7 QA Tests You Should Be Running7 QA Tests You Should Be Running
7 QA Tests You Should Be Running
 
Quality Assurance
Quality Assurance Quality Assurance
Quality Assurance
 
Test automation and Agile software development
Test automation and Agile software developmentTest automation and Agile software development
Test automation and Agile software development
 
The Essentials Of Test Driven Development
The Essentials Of Test Driven Development The Essentials Of Test Driven Development
The Essentials Of Test Driven Development
 
#TesterbhiCoder - Every Tester should get into coding - Selenium automation
#TesterbhiCoder - Every Tester should get into coding - Selenium automation#TesterbhiCoder - Every Tester should get into coding - Selenium automation
#TesterbhiCoder - Every Tester should get into coding - Selenium automation
 
Gamification in outsourcing company: experience report.
Gamification in outsourcing company: experience report.Gamification in outsourcing company: experience report.
Gamification in outsourcing company: experience report.
 
Automated Testing with Agile
Automated Testing with AgileAutomated Testing with Agile
Automated Testing with Agile
 
Why Automated Testing Matters To DevOps
Why Automated Testing Matters To DevOpsWhy Automated Testing Matters To DevOps
Why Automated Testing Matters To DevOps
 
ISTQB Foundation Agile Tester 2014 Training, Agile SW Development
ISTQB Foundation Agile Tester 2014 Training, Agile SW DevelopmentISTQB Foundation Agile Tester 2014 Training, Agile SW Development
ISTQB Foundation Agile Tester 2014 Training, Agile SW Development
 
DevLabs Alliance Top 20 Software Testing Interview Questions for SDET - by De...
DevLabs Alliance Top 20 Software Testing Interview Questions for SDET - by De...DevLabs Alliance Top 20 Software Testing Interview Questions for SDET - by De...
DevLabs Alliance Top 20 Software Testing Interview Questions for SDET - by De...
 
Agile testing - Reducing time to Market
Agile testing - Reducing time to MarketAgile testing - Reducing time to Market
Agile testing - Reducing time to Market
 
QA Process Overview
QA Process OverviewQA Process Overview
QA Process Overview
 
Amalgamation of BDD, parallel execution and mobile automation
Amalgamation of BDD, parallel execution and mobile automationAmalgamation of BDD, parallel execution and mobile automation
Amalgamation of BDD, parallel execution and mobile automation
 
10 Benefits of Automated Testing
10 Benefits of Automated Testing10 Benefits of Automated Testing
10 Benefits of Automated Testing
 
End-to-End Test Automation for Both Horizontal and Vertical Scale
End-to-End Test Automation for Both Horizontal and Vertical ScaleEnd-to-End Test Automation for Both Horizontal and Vertical Scale
End-to-End Test Automation for Both Horizontal and Vertical Scale
 

Similar a Tdd01 a simple intro to tdd

IRJET - A Valuable and Speculative Approach to Manage the Item Testing by usi...
IRJET - A Valuable and Speculative Approach to Manage the Item Testing by usi...IRJET - A Valuable and Speculative Approach to Manage the Item Testing by usi...
IRJET - A Valuable and Speculative Approach to Manage the Item Testing by usi...IRJET Journal
 
CookpadTechConf2018-(Mobile)TestAutomation
CookpadTechConf2018-(Mobile)TestAutomationCookpadTechConf2018-(Mobile)TestAutomation
CookpadTechConf2018-(Mobile)TestAutomationKazuaki Matsuo
 
Software Testing - A sneak preview By Srikanth
Software Testing - A sneak preview By SrikanthSoftware Testing - A sneak preview By Srikanth
Software Testing - A sneak preview By SrikanthSrikanth Krishnamoorthy
 
Agile Testing Dilemmas
Agile Testing DilemmasAgile Testing Dilemmas
Agile Testing DilemmasAman King
 
Testing Interview Questions.pdf
Testing Interview Questions.pdfTesting Interview Questions.pdf
Testing Interview Questions.pdfPradeepaKannan6
 
Zero touch QA automation platform for DevOps
Zero touch QA automation platform for DevOpsZero touch QA automation platform for DevOps
Zero touch QA automation platform for DevOpsTaUB Solutions
 
A Complete Guide to Codeless Testing.pdf
A Complete Guide to Codeless Testing.pdfA Complete Guide to Codeless Testing.pdf
A Complete Guide to Codeless Testing.pdfpCloudy
 
Continuous Delivery Testing @HiQ
Continuous Delivery Testing @HiQContinuous Delivery Testing @HiQ
Continuous Delivery Testing @HiQTomas Riha
 
201008 Software Testing Notes (part 1/2)
201008 Software Testing Notes (part 1/2)201008 Software Testing Notes (part 1/2)
201008 Software Testing Notes (part 1/2)Javier Gonzalez-Sanchez
 
Test Automation Strategies For Agile
Test Automation Strategies For AgileTest Automation Strategies For Agile
Test Automation Strategies For AgileNaresh Jain
 
QA Quadrants
QA QuadrantsQA Quadrants
QA Quadrantslychees
 
Moogilu qa-case study (Software Testing)
Moogilu qa-case study (Software Testing)Moogilu qa-case study (Software Testing)
Moogilu qa-case study (Software Testing)Jagadish Channagiri
 
Creating a successful continuous testing environment by Eran Kinsbruner
Creating a successful continuous testing environment by Eran KinsbrunerCreating a successful continuous testing environment by Eran Kinsbruner
Creating a successful continuous testing environment by Eran KinsbrunerQA or the Highway
 
Agile Software Development Process
Agile Software Development ProcessAgile Software Development Process
Agile Software Development ProcessScioSales
 
Product quality in agile project
Product quality in agile projectProduct quality in agile project
Product quality in agile projectNhan Nguyen
 

Similar a Tdd01 a simple intro to tdd (20)

IRJET - A Valuable and Speculative Approach to Manage the Item Testing by usi...
IRJET - A Valuable and Speculative Approach to Manage the Item Testing by usi...IRJET - A Valuable and Speculative Approach to Manage the Item Testing by usi...
IRJET - A Valuable and Speculative Approach to Manage the Item Testing by usi...
 
CookpadTechConf2018-(Mobile)TestAutomation
CookpadTechConf2018-(Mobile)TestAutomationCookpadTechConf2018-(Mobile)TestAutomation
CookpadTechConf2018-(Mobile)TestAutomation
 
Software Testing - A sneak preview By Srikanth
Software Testing - A sneak preview By SrikanthSoftware Testing - A sneak preview By Srikanth
Software Testing - A sneak preview By Srikanth
 
Agile Testing Dilemmas
Agile Testing DilemmasAgile Testing Dilemmas
Agile Testing Dilemmas
 
Gcs day1
Gcs day1Gcs day1
Gcs day1
 
Future of QA
Future of QAFuture of QA
Future of QA
 
Futureofqa
FutureofqaFutureofqa
Futureofqa
 
Testing Interview Questions.pdf
Testing Interview Questions.pdfTesting Interview Questions.pdf
Testing Interview Questions.pdf
 
Zero touch QA automation platform for DevOps
Zero touch QA automation platform for DevOpsZero touch QA automation platform for DevOps
Zero touch QA automation platform for DevOps
 
Agile testing
Agile testingAgile testing
Agile testing
 
A Complete Guide to Codeless Testing.pdf
A Complete Guide to Codeless Testing.pdfA Complete Guide to Codeless Testing.pdf
A Complete Guide to Codeless Testing.pdf
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Continuous Delivery Testing @HiQ
Continuous Delivery Testing @HiQContinuous Delivery Testing @HiQ
Continuous Delivery Testing @HiQ
 
201008 Software Testing Notes (part 1/2)
201008 Software Testing Notes (part 1/2)201008 Software Testing Notes (part 1/2)
201008 Software Testing Notes (part 1/2)
 
Test Automation Strategies For Agile
Test Automation Strategies For AgileTest Automation Strategies For Agile
Test Automation Strategies For Agile
 
QA Quadrants
QA QuadrantsQA Quadrants
QA Quadrants
 
Moogilu qa-case study (Software Testing)
Moogilu qa-case study (Software Testing)Moogilu qa-case study (Software Testing)
Moogilu qa-case study (Software Testing)
 
Creating a successful continuous testing environment by Eran Kinsbruner
Creating a successful continuous testing environment by Eran KinsbrunerCreating a successful continuous testing environment by Eran Kinsbruner
Creating a successful continuous testing environment by Eran Kinsbruner
 
Agile Software Development Process
Agile Software Development ProcessAgile Software Development Process
Agile Software Development Process
 
Product quality in agile project
Product quality in agile projectProduct quality in agile project
Product quality in agile project
 

Más de Miguel Alho

Four Key Metrics @ DevOps Aveiro #1
Four Key Metrics @ DevOps Aveiro #1Four Key Metrics @ DevOps Aveiro #1
Four Key Metrics @ DevOps Aveiro #1Miguel Alho
 
Delivering Changes for Applications and Databases
Delivering Changes for Applications and DatabasesDelivering Changes for Applications and Databases
Delivering Changes for Applications and DatabasesMiguel Alho
 
Programacão para não programadores
Programacão para não programadoresProgramacão para não programadores
Programacão para não programadoresMiguel Alho
 
5 Pontos sobre desenvolvimento de software
5 Pontos sobre desenvolvimento de software5 Pontos sobre desenvolvimento de software
5 Pontos sobre desenvolvimento de softwareMiguel Alho
 
Aspectos profissionais 3pontos
Aspectos profissionais 3pontosAspectos profissionais 3pontos
Aspectos profissionais 3pontosMiguel Alho
 

Más de Miguel Alho (7)

Four Key Metrics @ DevOps Aveiro #1
Four Key Metrics @ DevOps Aveiro #1Four Key Metrics @ DevOps Aveiro #1
Four Key Metrics @ DevOps Aveiro #1
 
Delivering Changes for Applications and Databases
Delivering Changes for Applications and DatabasesDelivering Changes for Applications and Databases
Delivering Changes for Applications and Databases
 
Kanban
KanbanKanban
Kanban
 
Programacão para não programadores
Programacão para não programadoresProgramacão para não programadores
Programacão para não programadores
 
5 Pontos sobre desenvolvimento de software
5 Pontos sobre desenvolvimento de software5 Pontos sobre desenvolvimento de software
5 Pontos sobre desenvolvimento de software
 
Web 3.0
Web 3.0Web 3.0
Web 3.0
 
Aspectos profissionais 3pontos
Aspectos profissionais 3pontosAspectos profissionais 3pontos
Aspectos profissionais 3pontos
 

Tdd01 a simple intro to tdd