SlideShare a Scribd company logo
How Important is
Testing.
How Testing makes writing code even more easier!
Understanding BDD and TDD
• Test Driven Development in simple form is :
Write your tests.
Watch them fail.
Make them pass.
Refactor.
Repeat.
BDD – Behavior Driven
Development
• BDD – Behavior Driven Development on the other hand is a
little more complex. It is more of a team work.
• It is more of how a desired behavior should be specified.
• In this concept, Business Analysts and Developers should
specify behaviors in terms of “User Stories”.
• Involving the stake holders in the implementation process
through outside-in Software Development.
• Now we have our own “Jasmine” which helps us test our
JavaScript code in a more TDD way of style.
• For more information on BDD learn here (Wiki is the
best!)http://en.wikipedia.org/wiki/Behavior-
driven_development
Real Code! Wohoo….
• If you're all into Rspec, you’ll see Jasmine Framework very
similar.
describe('JavaScript addition operator', function () {
it('adds two numbers together', function () { expect(1 +
2).toEqual(3);
}); });
• “Describe” and “it” functions – Take two parameters a string
and a function.
• Inside “it” block – Write setup code you need for your test.
• Ready to write the actual test – Start with the “expect”
function.
Setting up Jasmine
So why the Test??
• Unit tests and test-driven development (TDD) have so many
hidden and personal benefits as well as the obvious ones, you
just can't really explain to somebody until they're doing it
themselves.
• Unit tests allows you to make big changes to code quickly.
• You know it works now for sure (because you’ve run the
tests!)
• When you follow TDD no code is considered as
bad/buggy/annoying.
• Unit test helps you to understand the design of the code that
you’re working on.
• “One test is worth a thousand expert opinions”. Imagine you
writing the test and saying with confidence (that damn thing
works!)
• Good unit tests can help document and define what
something is supposed to do
• Unit tests help with code re-use. Migrate both your
code and your tests to your new project. Tweak the code till
the tests run again.
• Writing unit tests can consume a lot of time in the beginning
but it’s so much worth it.
Sold!
You know it’s good for you, then why not start testing your code.
• Good unit tests can help document and define what
something is supposed to do
• Unit tests help with code re-use. Migrate both your
code and your tests to your new project. Tweak the code till
the tests run again.
• Writing unit tests can consume a lot of time in the beginning
but it’s so much worth it.
Sold!
You know it’s good for you, then why not start testing your code.
Resources!
• BDD Wiki
• TDD Wiki
• https://github.com/jasmine/jasmine/wiki
• Rspec Rails
• http://agiledata.org/essays/tdd.html
• http://c2.com/cgi/wiki?TestDrivenDevelopment
Books:
• http://www.amazon.com/Test-Driven-Development-By-
Example/dp/0321146530
• http://www.amazon.com/dp/0596006896/?tag=stackoverfl08
-20
• http://www.growing-object-oriented-software.com/
Have fun testing! 
Follow me on Twitter: @SanaNasar_

More Related Content

What's hot (20)

PPT
Code Quality
François Camus
 
PPTX
What Is Cucumber?
QATestLab
 
PDF
Testing in a continuous delivery world - XP Days Ukraine
Wouter Lagerweij
 
PPTX
TDD with RSpec
Rachid Calazans
 
PDF
Working effectively with legacy code chapter1
Hiroaki NAKADA
 
PDF
TLC2018 Shyam Sunder: Legoizing Testing
Anna Royzman
 
PDF
Why and how to keep your code quality
Krešimir Antolić
 
PDF
TDD for Testers Workshop
Sarah Usher
 
PPT
Test Driven Development
Robert Stackhouse
 
PPTX
Nascenia: Road to Software Industry
Nascenia IT
 
PPTX
Outside-in Testing in Vue with Cypress
Josh Justice
 
PDF
BDD with the Cucumber
Mücahit Kurt
 
PPTX
Code Quality Assurance
Bart Blommaerts
 
PDF
Introduction to TDD and BDD
Luis García Castro
 
PPTX
Acceptance Test Driven Development and Robot Framework
Steve Zhang
 
KEY
Javascript Tests with Jasmine for Front-end Devs
Chris Powers
 
PPT
What Software Quality Assurance Means to Me
Robert Stackhouse
 
PDF
TDD and Simple Design Workshop - Session 1 - March 2019
Paulo Clavijo
 
PPTX
Clean code - Getting your R&D on board
Ruth Sperer
 
PPTX
BDD and Behave
Adam Englander
 
Code Quality
François Camus
 
What Is Cucumber?
QATestLab
 
Testing in a continuous delivery world - XP Days Ukraine
Wouter Lagerweij
 
TDD with RSpec
Rachid Calazans
 
Working effectively with legacy code chapter1
Hiroaki NAKADA
 
TLC2018 Shyam Sunder: Legoizing Testing
Anna Royzman
 
Why and how to keep your code quality
Krešimir Antolić
 
TDD for Testers Workshop
Sarah Usher
 
Test Driven Development
Robert Stackhouse
 
Nascenia: Road to Software Industry
Nascenia IT
 
Outside-in Testing in Vue with Cypress
Josh Justice
 
BDD with the Cucumber
Mücahit Kurt
 
Code Quality Assurance
Bart Blommaerts
 
Introduction to TDD and BDD
Luis García Castro
 
Acceptance Test Driven Development and Robot Framework
Steve Zhang
 
Javascript Tests with Jasmine for Front-end Devs
Chris Powers
 
What Software Quality Assurance Means to Me
Robert Stackhouse
 
TDD and Simple Design Workshop - Session 1 - March 2019
Paulo Clavijo
 
Clean code - Getting your R&D on board
Ruth Sperer
 
BDD and Behave
Adam Englander
 

Viewers also liked (19)

DOC
Rpp bahasa indonesiaberkaraktersmpkelasixsms1bagus
mujahidah khilafah (Shintia Minandar)
 
PPTX
Magazines
haverstockmedia
 
PPS
Louis Armstrong
Nela Krangle
 
PDF
Male Dream Codec Illustration
Eli Bishop
 
PDF
4345 libro-derecho-probatorio-4
Alejandra Herrera
 
DOCX
Estatura baixa; reverter crescendo estatural, fatores genéticos de cresciment...
Van Der Häägen Brazil
 
PPTX
BRQ Framework 5-8-13 FINAL (1)
Kyle D. Gearhart
 
PDF
Scoreboard Projects
Sheila Umstead
 
PPTX
Analisis estadístico de los accidentes y enfermedades ocupacionales
Jenni1117
 
PPTX
2016輕鬆開發自有網路地圖工作坊 進階班 0701
family
 
PPTX
Liderazgo etico
faustinopadron19
 
PDF
Novo simulado 2
Aires Jones
 
PDF
Why Are Less Women in Computer Science - Data Science Project
Sana Nasar
 
PDF
Estudo do texto. Interpretação e compreensão de texto.
Aires Jones
 
PDF
Exercícios sobre espécies e gêneros literários
ma.no.el.ne.ves
 
PPT
Liderazgo Etico
Javier Lau
 
PPTX
Estrutura de palavras
Walace Cestari
 
Rpp bahasa indonesiaberkaraktersmpkelasixsms1bagus
mujahidah khilafah (Shintia Minandar)
 
Magazines
haverstockmedia
 
Louis Armstrong
Nela Krangle
 
Male Dream Codec Illustration
Eli Bishop
 
4345 libro-derecho-probatorio-4
Alejandra Herrera
 
Estatura baixa; reverter crescendo estatural, fatores genéticos de cresciment...
Van Der Häägen Brazil
 
BRQ Framework 5-8-13 FINAL (1)
Kyle D. Gearhart
 
Scoreboard Projects
Sheila Umstead
 
Analisis estadístico de los accidentes y enfermedades ocupacionales
Jenni1117
 
2016輕鬆開發自有網路地圖工作坊 進階班 0701
family
 
Liderazgo etico
faustinopadron19
 
Novo simulado 2
Aires Jones
 
Why Are Less Women in Computer Science - Data Science Project
Sana Nasar
 
Estudo do texto. Interpretação e compreensão de texto.
Aires Jones
 
Exercícios sobre espécies e gêneros literários
ma.no.el.ne.ves
 
Liderazgo Etico
Javier Lau
 
Estrutura de palavras
Walace Cestari
 
Ad

Similar to Understanding Why Testing is Importaint (20)

PPTX
Test-driven development & Behavior-driven development basics
Oleksii Prohonnyi
 
PPTX
Gateway to Agile: XP and BDD
Gervais Johnson, Advisor
 
PDF
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Abdelkrim Boujraf
 
PPTX
A Brief Introduction to Test-Driven Development
Shawn Jones
 
PPTX
Building In Quality: The Beauty Of Behavior Driven Development (BDD)
Synerzip
 
PPTX
Making the Move to Behavior Driven Development
QASymphony
 
PDF
TDD vs BDD_ Which Development Approach is Best for Your Project.pdf
Steve Wortham
 
PDF
How BDD enables True CI/CD
Roger Turnau
 
PPTX
Topic tdd-and-bdd b4usolution
Hoa Le
 
PPTX
Test-Driven Development In Action
Jon Kruger
 
PPTX
Tdd and bdd
MohamedSubhiBouchi
 
ODP
xUnit and TDD: Why and How in Enterprise Software, August 2012
Justin Gordon
 
PPTX
Behavior Driven Development
Adam Englander
 
PPTX
Test Driven Development
Md. Enamul Haque Chowdhury
 
PPTX
TDD in Agile
Atish Narlawar
 
PDF
Making the Move to Behavior-Driven Development
TechWell
 
PPTX
TDD - Seriously, try it - Codemotion (May '24)
Nacho Cougil
 
PDF
Inside Behavior Driven Development
Camille Bell
 
PPTX
An Introduction To Software Development - Test Driven Development, Part 1
Blue Elephant Consulting
 
Test-driven development & Behavior-driven development basics
Oleksii Prohonnyi
 
Gateway to Agile: XP and BDD
Gervais Johnson, Advisor
 
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Abdelkrim Boujraf
 
A Brief Introduction to Test-Driven Development
Shawn Jones
 
Building In Quality: The Beauty Of Behavior Driven Development (BDD)
Synerzip
 
Making the Move to Behavior Driven Development
QASymphony
 
TDD vs BDD_ Which Development Approach is Best for Your Project.pdf
Steve Wortham
 
How BDD enables True CI/CD
Roger Turnau
 
Topic tdd-and-bdd b4usolution
Hoa Le
 
Test-Driven Development In Action
Jon Kruger
 
Tdd and bdd
MohamedSubhiBouchi
 
xUnit and TDD: Why and How in Enterprise Software, August 2012
Justin Gordon
 
Behavior Driven Development
Adam Englander
 
Test Driven Development
Md. Enamul Haque Chowdhury
 
TDD in Agile
Atish Narlawar
 
Making the Move to Behavior-Driven Development
TechWell
 
TDD - Seriously, try it - Codemotion (May '24)
Nacho Cougil
 
Inside Behavior Driven Development
Camille Bell
 
An Introduction To Software Development - Test Driven Development, Part 1
Blue Elephant Consulting
 
Ad

Recently uploaded (20)

PPTX
Presentation 2.pptx AI-powered home security systems Secure-by-design IoT fr...
SoundaryaBC2
 
PPTX
Worm gear strength and wear calculation as per standard VB Bhandari Databook.
shahveer210504
 
PDF
International Journal of Information Technology Convergence and services (IJI...
ijitcsjournal4
 
PPTX
Thermal runway and thermal stability.pptx
godow93766
 
PPTX
Product Development & DevelopmentLecture02.pptx
zeeshanwazir2
 
PDF
Electrical Engineer operation Supervisor
ssaruntatapower143
 
DOCX
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
PPT
Carmon_Remote Sensing GIS by Mahesh kumar
DhananjayM6
 
PPTX
Shinkawa Proposal to meet Vibration API670.pptx
AchmadBashori2
 
PDF
Halide Perovskites’ Multifunctional Properties: Coordination Engineering, Coo...
TaameBerhe2
 
PPTX
Big Data and Data Science hype .pptx
SUNEEL37
 
PPTX
2025 CGI Congres - Surviving agile v05.pptx
Derk-Jan de Grood
 
PPTX
Introduction to Basic Renewable Energy.pptx
examcoordinatormesu
 
PDF
smart lot access control system with eye
rasabzahra
 
PDF
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
PPTX
What is Shot Peening | Shot Peening is a Surface Treatment Process
Vibra Finish
 
PPTX
Introduction to Design of Machine Elements
PradeepKumarS27
 
PPTX
Heart Bleed Bug - A case study (Course: Cryptography and Network Security)
Adri Jovin
 
PDF
MAD Unit - 1 Introduction of Android IT Department
JappanMavani
 
PDF
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
Presentation 2.pptx AI-powered home security systems Secure-by-design IoT fr...
SoundaryaBC2
 
Worm gear strength and wear calculation as per standard VB Bhandari Databook.
shahveer210504
 
International Journal of Information Technology Convergence and services (IJI...
ijitcsjournal4
 
Thermal runway and thermal stability.pptx
godow93766
 
Product Development & DevelopmentLecture02.pptx
zeeshanwazir2
 
Electrical Engineer operation Supervisor
ssaruntatapower143
 
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
Carmon_Remote Sensing GIS by Mahesh kumar
DhananjayM6
 
Shinkawa Proposal to meet Vibration API670.pptx
AchmadBashori2
 
Halide Perovskites’ Multifunctional Properties: Coordination Engineering, Coo...
TaameBerhe2
 
Big Data and Data Science hype .pptx
SUNEEL37
 
2025 CGI Congres - Surviving agile v05.pptx
Derk-Jan de Grood
 
Introduction to Basic Renewable Energy.pptx
examcoordinatormesu
 
smart lot access control system with eye
rasabzahra
 
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
What is Shot Peening | Shot Peening is a Surface Treatment Process
Vibra Finish
 
Introduction to Design of Machine Elements
PradeepKumarS27
 
Heart Bleed Bug - A case study (Course: Cryptography and Network Security)
Adri Jovin
 
MAD Unit - 1 Introduction of Android IT Department
JappanMavani
 
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 

Understanding Why Testing is Importaint

  • 1. How Important is Testing. How Testing makes writing code even more easier!
  • 2. Understanding BDD and TDD • Test Driven Development in simple form is : Write your tests. Watch them fail. Make them pass. Refactor. Repeat.
  • 3. BDD – Behavior Driven Development • BDD – Behavior Driven Development on the other hand is a little more complex. It is more of a team work. • It is more of how a desired behavior should be specified. • In this concept, Business Analysts and Developers should specify behaviors in terms of “User Stories”. • Involving the stake holders in the implementation process through outside-in Software Development. • Now we have our own “Jasmine” which helps us test our JavaScript code in a more TDD way of style. • For more information on BDD learn here (Wiki is the best!)http://en.wikipedia.org/wiki/Behavior- driven_development
  • 4. Real Code! Wohoo…. • If you're all into Rspec, you’ll see Jasmine Framework very similar. describe('JavaScript addition operator', function () { it('adds two numbers together', function () { expect(1 + 2).toEqual(3); }); }); • “Describe” and “it” functions – Take two parameters a string and a function. • Inside “it” block – Write setup code you need for your test. • Ready to write the actual test – Start with the “expect” function.
  • 6. So why the Test?? • Unit tests and test-driven development (TDD) have so many hidden and personal benefits as well as the obvious ones, you just can't really explain to somebody until they're doing it themselves. • Unit tests allows you to make big changes to code quickly. • You know it works now for sure (because you’ve run the tests!) • When you follow TDD no code is considered as bad/buggy/annoying. • Unit test helps you to understand the design of the code that you’re working on.
  • 7. • “One test is worth a thousand expert opinions”. Imagine you writing the test and saying with confidence (that damn thing works!)
  • 8. • Good unit tests can help document and define what something is supposed to do • Unit tests help with code re-use. Migrate both your code and your tests to your new project. Tweak the code till the tests run again. • Writing unit tests can consume a lot of time in the beginning but it’s so much worth it. Sold! You know it’s good for you, then why not start testing your code.
  • 9. • Good unit tests can help document and define what something is supposed to do • Unit tests help with code re-use. Migrate both your code and your tests to your new project. Tweak the code till the tests run again. • Writing unit tests can consume a lot of time in the beginning but it’s so much worth it. Sold! You know it’s good for you, then why not start testing your code.
  • 10. Resources! • BDD Wiki • TDD Wiki • https://github.com/jasmine/jasmine/wiki • Rspec Rails • http://agiledata.org/essays/tdd.html • http://c2.com/cgi/wiki?TestDrivenDevelopment Books: • http://www.amazon.com/Test-Driven-Development-By- Example/dp/0321146530 • http://www.amazon.com/dp/0596006896/?tag=stackoverfl08 -20 • http://www.growing-object-oriented-software.com/
  • 11. Have fun testing!  Follow me on Twitter: @SanaNasar_