SlideShare a Scribd company logo
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
Tdd01 a simple intro to tdd
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
Tdd01 a simple intro to tdd
know what works at
any given moment
Tdd01 a simple intro to tdd
Tdd01 a simple intro to tdd
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
Tdd01 a simple intro to tdd
TDD vs.
Unit Testing
unit testing
is not
TDD
TDD
is
unit testing
(in a particular order)
Tdd01 a simple intro to tdd
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

More Related Content

PDF
Using AI-Powered Visual Tests to empower your tests
PPTX
Agile test tools
PDF
Software Testing As a Career Path
PDF
Testing automation in agile environment
PDF
Test Automation Beyond Test Execution
PDF
Methodology: IT test
PPTX
Code review at large scale
PDF
Getting to Continuous Deployment (Webinar Slides)
Using AI-Powered Visual Tests to empower your tests
Agile test tools
Software Testing As a Career Path
Testing automation in agile environment
Test Automation Beyond Test Execution
Methodology: IT test
Code review at large scale
Getting to Continuous Deployment (Webinar Slides)

What's hot (20)

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

Similar to Tdd01 a simple intro to tdd (20)

PDF
IRJET - A Valuable and Speculative Approach to Manage the Item Testing by usi...
PDF
CookpadTechConf2018-(Mobile)TestAutomation
PDF
Software Development Lifecycle Presentation
PPTX
Software Testing - A sneak preview By Srikanth
PPTX
Agile Testing Dilemmas
PPT
Gcs day1
PPT
Future of QA
PPT
Futureofqa
PDF
Testing Interview Questions.pdf
PPTX
Zero touch QA automation platform for DevOps
PDF
Agile testing
PDF
A Complete Guide to Codeless Testing.pdf
PPTX
Software Testing
PDF
Continuous Delivery Testing @HiQ
PDF
201008 Software Testing Notes (part 1/2)
PPT
Test Automation Strategies For Agile
PPTX
QA Quadrants
PDF
Moogilu qa-case study (Software Testing)
PDF
Creating a successful continuous testing environment by Eran Kinsbruner
PPT
Agile Software Development Process
IRJET - A Valuable and Speculative Approach to Manage the Item Testing by usi...
CookpadTechConf2018-(Mobile)TestAutomation
Software Development Lifecycle Presentation
Software Testing - A sneak preview By Srikanth
Agile Testing Dilemmas
Gcs day1
Future of QA
Futureofqa
Testing Interview Questions.pdf
Zero touch QA automation platform for DevOps
Agile testing
A Complete Guide to Codeless Testing.pdf
Software Testing
Continuous Delivery Testing @HiQ
201008 Software Testing Notes (part 1/2)
Test Automation Strategies For Agile
QA Quadrants
Moogilu qa-case study (Software Testing)
Creating a successful continuous testing environment by Eran Kinsbruner
Agile Software Development Process
Ad

More from Miguel Alho (7)

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

Tdd01 a simple intro to tdd