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)

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

Viewers also liked (19)

Magazines
MagazinesMagazines
Magazines
haverstockmedia
 
Louis Armstrong
Louis ArmstrongLouis Armstrong
Louis Armstrong
Nela Krangle
 
Male Dream Codec Illustration
Male Dream Codec IllustrationMale Dream Codec Illustration
Male Dream Codec Illustration
Eli Bishop
 
4345 libro-derecho-probatorio-4
4345 libro-derecho-probatorio-44345 libro-derecho-probatorio-4
4345 libro-derecho-probatorio-4
Alejandra Herrera
 
Estatura baixa; reverter crescendo estatural, fatores genéticos de cresciment...
Estatura baixa; reverter crescendo estatural, fatores genéticos de cresciment...Estatura baixa; reverter crescendo estatural, fatores genéticos de cresciment...
Estatura baixa; reverter crescendo estatural, fatores genéticos de cresciment...
Van Der Häägen Brazil
 
BRQ Framework 5-8-13 FINAL (1)
BRQ Framework 5-8-13  FINAL (1)BRQ Framework 5-8-13  FINAL (1)
BRQ Framework 5-8-13 FINAL (1)
Kyle D. Gearhart
 
Analisis estadístico de los accidentes y enfermedades ocupacionales
Analisis estadístico de los accidentes y enfermedades ocupacionalesAnalisis estadístico de los accidentes y enfermedades ocupacionales
Analisis estadístico de los accidentes y enfermedades ocupacionales
Jenni1117
 
.
..
.
Biblioteca Soares Dos Reis
 
2016輕鬆開發自有網路地圖工作坊 進階班 0701
2016輕鬆開發自有網路地圖工作坊 進階班 07012016輕鬆開發自有網路地圖工作坊 進階班 0701
2016輕鬆開發自有網路地圖工作坊 進階班 0701
family
 
Liderazgo etico
Liderazgo eticoLiderazgo etico
Liderazgo etico
faustinopadron19
 
Novo simulado 2
Novo simulado 2Novo simulado 2
Novo simulado 2
Aires Jones
 
International Journal of Agriculture
International Journal of AgricultureInternational Journal of Agriculture
International Journal of Agriculture
International Journal of Environment, Agriculture and Biotechnology
 
Why Are Less Women in Computer Science - Data Science Project
Why Are Less Women in Computer Science - Data Science ProjectWhy Are Less Women in Computer Science - Data Science Project
Why Are Less Women in Computer Science - Data Science Project
Sana Nasar
 
Estudo do texto. Interpretação e compreensão de texto.
Estudo do texto. Interpretação e compreensão de texto.Estudo do texto. Interpretação e compreensão de texto.
Estudo do texto. Interpretação e compreensão de texto.
Aires Jones
 
Exercícios sobre espécies e gêneros literários
Exercícios sobre espécies e gêneros literáriosExercícios sobre espécies e gêneros literários
Exercícios sobre espécies e gêneros literários
ma.no.el.ne.ves
 
Liderazgo Etico
Liderazgo EticoLiderazgo Etico
Liderazgo Etico
Javier Lau
 
Estrutura de palavras
Estrutura de palavrasEstrutura de palavras
Estrutura de palavras
Walace Cestari
 
Male Dream Codec Illustration
Male Dream Codec IllustrationMale Dream Codec Illustration
Male Dream Codec Illustration
Eli Bishop
 
4345 libro-derecho-probatorio-4
4345 libro-derecho-probatorio-44345 libro-derecho-probatorio-4
4345 libro-derecho-probatorio-4
Alejandra Herrera
 
Estatura baixa; reverter crescendo estatural, fatores genéticos de cresciment...
Estatura baixa; reverter crescendo estatural, fatores genéticos de cresciment...Estatura baixa; reverter crescendo estatural, fatores genéticos de cresciment...
Estatura baixa; reverter crescendo estatural, fatores genéticos de cresciment...
Van Der Häägen Brazil
 
BRQ Framework 5-8-13 FINAL (1)
BRQ Framework 5-8-13  FINAL (1)BRQ Framework 5-8-13  FINAL (1)
BRQ Framework 5-8-13 FINAL (1)
Kyle D. Gearhart
 
Analisis estadístico de los accidentes y enfermedades ocupacionales
Analisis estadístico de los accidentes y enfermedades ocupacionalesAnalisis estadístico de los accidentes y enfermedades ocupacionales
Analisis estadístico de los accidentes y enfermedades ocupacionales
Jenni1117
 
2016輕鬆開發自有網路地圖工作坊 進階班 0701
2016輕鬆開發自有網路地圖工作坊 進階班 07012016輕鬆開發自有網路地圖工作坊 進階班 0701
2016輕鬆開發自有網路地圖工作坊 進階班 0701
family
 
Why Are Less Women in Computer Science - Data Science Project
Why Are Less Women in Computer Science - Data Science ProjectWhy Are Less Women in Computer Science - Data Science Project
Why Are Less Women in Computer Science - Data Science Project
Sana Nasar
 
Estudo do texto. Interpretação e compreensão de texto.
Estudo do texto. Interpretação e compreensão de texto.Estudo do texto. Interpretação e compreensão de texto.
Estudo do texto. Interpretação e compreensão de texto.
Aires Jones
 
Exercícios sobre espécies e gêneros literários
Exercícios sobre espécies e gêneros literáriosExercícios sobre espécies e gêneros literários
Exercícios sobre espécies e gêneros literários
ma.no.el.ne.ves
 
Liderazgo Etico
Liderazgo EticoLiderazgo Etico
Liderazgo Etico
Javier Lau
 

Similar to Understanding Why Testing is Importaint (20)

Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Jason Tice
 
Tdd and bdd
Tdd and bddTdd and bdd
Tdd and bdd
MohamedSubhiBouchi
 
TDD - Seriously, try it - Codemotion (May '24)
TDD - Seriously, try it - Codemotion (May '24)TDD - Seriously, try it - Codemotion (May '24)
TDD - Seriously, try it - Codemotion (May '24)
Nacho Cougil
 
TDD in Agile
TDD in AgileTDD in Agile
TDD in Agile
Atish Narlawar
 
Driving application development through behavior driven development
Driving application development through behavior driven developmentDriving application development through behavior driven development
Driving application development through behavior driven development
Einar Ingebrigtsen
 
TDD - Seriously, try it! - Opensouthcode
TDD - Seriously, try it! - OpensouthcodeTDD - Seriously, try it! - Opensouthcode
TDD - Seriously, try it! - Opensouthcode
Nacho Cougil
 
Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)
Danny Preussler
 
Test-Driven Development Reference Card
Test-Driven Development Reference CardTest-Driven Development Reference Card
Test-Driven Development Reference Card
Seapine Software
 
BDD presentation
BDD presentationBDD presentation
BDD presentation
temebele
 
{10.0} Test Driven Development.pptx
{10.0} Test Driven Development.pptx{10.0} Test Driven Development.pptx
{10.0} Test Driven Development.pptx
AmalEldhose2
 
TDD - Seriously, try it! (updated '22)
TDD - Seriously, try it! (updated '22)TDD - Seriously, try it! (updated '22)
TDD - Seriously, try it! (updated '22)
Nacho Cougil
 
Gateway to Agile: XP and BDD
Gateway to Agile: XP and BDD Gateway to Agile: XP and BDD
Gateway to Agile: XP and BDD
Gervais Johnson, Advisor
 
Test Driven Development using QUnit
Test Driven Development using QUnitTest Driven Development using QUnit
Test Driven Development using QUnit
satejsahu
 
iOS Test-Driven Development
iOS Test-Driven DevelopmentiOS Test-Driven Development
iOS Test-Driven Development
Pablo Villar
 
TDD and BDD in Sky Deutschland
TDD and BDD in Sky DeutschlandTDD and BDD in Sky Deutschland
TDD and BDD in Sky Deutschland
Murphy Meng
 
Prashant technical practices-tdd for xebia event
Prashant   technical practices-tdd for xebia eventPrashant   technical practices-tdd for xebia event
Prashant technical practices-tdd for xebia event
Xebia India
 
Extreme Programming (XP): Revisted
Extreme Programming (XP): RevistedExtreme Programming (XP): Revisted
Extreme Programming (XP): Revisted
Mike Harris
 
TDD - Seriously, try it! - Bucarest Tech Week
TDD - Seriously, try it! - Bucarest Tech WeekTDD - Seriously, try it! - Bucarest Tech Week
TDD - Seriously, try it! - Bucarest Tech Week
Nacho Cougil
 
TDD - Seriously, try it! - Trójmiasto Java User Group (17th May '23)
TDD - Seriously, try it! - Trójmiasto Java User Group (17th May '23)TDD - Seriously, try it! - Trójmiasto Java User Group (17th May '23)
TDD - Seriously, try it! - Trójmiasto Java User Group (17th May '23)
ssusercaf6c1
 
TDD - Seriously, try it! - Trjjmiasto JUG (17th May '23)
TDD - Seriously, try it! - Trjjmiasto JUG (17th May '23)TDD - Seriously, try it! - Trjjmiasto JUG (17th May '23)
TDD - Seriously, try it! - Trjjmiasto JUG (17th May '23)
Nacho Cougil
 
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Joe Cisar - Everything I Know About TDD - Agile Midwest 2019
Jason Tice
 
TDD - Seriously, try it - Codemotion (May '24)
TDD - Seriously, try it - Codemotion (May '24)TDD - Seriously, try it - Codemotion (May '24)
TDD - Seriously, try it - Codemotion (May '24)
Nacho Cougil
 
Driving application development through behavior driven development
Driving application development through behavior driven developmentDriving application development through behavior driven development
Driving application development through behavior driven development
Einar Ingebrigtsen
 
TDD - Seriously, try it! - Opensouthcode
TDD - Seriously, try it! - OpensouthcodeTDD - Seriously, try it! - Opensouthcode
TDD - Seriously, try it! - Opensouthcode
Nacho Cougil
 
Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)
Danny Preussler
 
Test-Driven Development Reference Card
Test-Driven Development Reference CardTest-Driven Development Reference Card
Test-Driven Development Reference Card
Seapine Software
 
BDD presentation
BDD presentationBDD presentation
BDD presentation
temebele
 
{10.0} Test Driven Development.pptx
{10.0} Test Driven Development.pptx{10.0} Test Driven Development.pptx
{10.0} Test Driven Development.pptx
AmalEldhose2
 
TDD - Seriously, try it! (updated '22)
TDD - Seriously, try it! (updated '22)TDD - Seriously, try it! (updated '22)
TDD - Seriously, try it! (updated '22)
Nacho Cougil
 
Test Driven Development using QUnit
Test Driven Development using QUnitTest Driven Development using QUnit
Test Driven Development using QUnit
satejsahu
 
iOS Test-Driven Development
iOS Test-Driven DevelopmentiOS Test-Driven Development
iOS Test-Driven Development
Pablo Villar
 
TDD and BDD in Sky Deutschland
TDD and BDD in Sky DeutschlandTDD and BDD in Sky Deutschland
TDD and BDD in Sky Deutschland
Murphy Meng
 
Prashant technical practices-tdd for xebia event
Prashant   technical practices-tdd for xebia eventPrashant   technical practices-tdd for xebia event
Prashant technical practices-tdd for xebia event
Xebia India
 
Extreme Programming (XP): Revisted
Extreme Programming (XP): RevistedExtreme Programming (XP): Revisted
Extreme Programming (XP): Revisted
Mike Harris
 
TDD - Seriously, try it! - Bucarest Tech Week
TDD - Seriously, try it! - Bucarest Tech WeekTDD - Seriously, try it! - Bucarest Tech Week
TDD - Seriously, try it! - Bucarest Tech Week
Nacho Cougil
 
TDD - Seriously, try it! - Trójmiasto Java User Group (17th May '23)
TDD - Seriously, try it! - Trójmiasto Java User Group (17th May '23)TDD - Seriously, try it! - Trójmiasto Java User Group (17th May '23)
TDD - Seriously, try it! - Trójmiasto Java User Group (17th May '23)
ssusercaf6c1
 
TDD - Seriously, try it! - Trjjmiasto JUG (17th May '23)
TDD - Seriously, try it! - Trjjmiasto JUG (17th May '23)TDD - Seriously, try it! - Trjjmiasto JUG (17th May '23)
TDD - Seriously, try it! - Trjjmiasto JUG (17th May '23)
Nacho Cougil
 

Recently uploaded (20)

Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...
Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...
Structural Response of Reinforced Self-Compacting Concrete Deep Beam Using Fi...
Journal of Soft Computing in Civil Engineering
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptxLidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
RishavKumar530754
 
introduction to machine learining for beginers
introduction to machine learining for beginersintroduction to machine learining for beginers
introduction to machine learining for beginers
JoydebSheet
 
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G..."Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
Infopitaara
 
IntroSlides-April-BuildWithAI-VertexAI.pdf
IntroSlides-April-BuildWithAI-VertexAI.pdfIntroSlides-April-BuildWithAI-VertexAI.pdf
IntroSlides-April-BuildWithAI-VertexAI.pdf
Luiz Carneiro
 
Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.
anuragmk56
 
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E..."Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
Infopitaara
 
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Process Parameter Optimization for Minimizing Springback in Cold Drawing Proc...
Journal of Soft Computing in Civil Engineering
 
Raish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdfRaish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdf
RaishKhanji
 
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITYADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ijscai
 
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Development of MLR, ANN and ANFIS Models for Estimation of PCUs at Different ...
Journal of Soft Computing in Civil Engineering
 
Compiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptxCompiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptx
RushaliDeshmukh2
 
new ppt artificial intelligence historyyy
new ppt artificial intelligence historyyynew ppt artificial intelligence historyyy
new ppt artificial intelligence historyyy
PianoPianist
 
Smart_Storage_Systems_Production_Engineering.pptx
Smart_Storage_Systems_Production_Engineering.pptxSmart_Storage_Systems_Production_Engineering.pptx
Smart_Storage_Systems_Production_Engineering.pptx
rushikeshnavghare94
 
AI-assisted Software Testing (3-hours tutorial)
AI-assisted Software Testing (3-hours tutorial)AI-assisted Software Testing (3-hours tutorial)
AI-assisted Software Testing (3-hours tutorial)
Vəhid Gəruslu
 
Level 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical SafetyLevel 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical Safety
JoseAlbertoCariasDel
 
Introduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptxIntroduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptx
AS1920
 
Metal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistryMetal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistry
mee23nu
 
Degree_of_Automation.pdf for Instrumentation and industrial specialist
Degree_of_Automation.pdf for  Instrumentation  and industrial specialistDegree_of_Automation.pdf for  Instrumentation  and industrial specialist
Degree_of_Automation.pdf for Instrumentation and industrial specialist
shreyabhosale19
 
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdffive-year-soluhhhhhhhhhhhhhhhhhtions.pdf
five-year-soluhhhhhhhhhhhhhhhhhtions.pdf
AdityaSharma944496
 
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptxLidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
Lidar for Autonomous Driving, LiDAR Mapping for Driverless Cars.pptx
RishavKumar530754
 
introduction to machine learining for beginers
introduction to machine learining for beginersintroduction to machine learining for beginers
introduction to machine learining for beginers
JoydebSheet
 
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G..."Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
"Feed Water Heaters in Thermal Power Plants: Types, Working, and Efficiency G...
Infopitaara
 
IntroSlides-April-BuildWithAI-VertexAI.pdf
IntroSlides-April-BuildWithAI-VertexAI.pdfIntroSlides-April-BuildWithAI-VertexAI.pdf
IntroSlides-April-BuildWithAI-VertexAI.pdf
Luiz Carneiro
 
Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.Fort night presentation new0903 pdf.pdf.
Fort night presentation new0903 pdf.pdf.
anuragmk56
 
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E..."Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
"Boiler Feed Pump (BFP): Working, Applications, Advantages, and Limitations E...
Infopitaara
 
Raish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdfRaish Khanji GTU 8th sem Internship Report.pdf
Raish Khanji GTU 8th sem Internship Report.pdf
RaishKhanji
 
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITYADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ADVXAI IN MALWARE ANALYSIS FRAMEWORK: BALANCING EXPLAINABILITY WITH SECURITY
ijscai
 
Compiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptxCompiler Design Unit1 PPT Phases of Compiler.pptx
Compiler Design Unit1 PPT Phases of Compiler.pptx
RushaliDeshmukh2
 
new ppt artificial intelligence historyyy
new ppt artificial intelligence historyyynew ppt artificial intelligence historyyy
new ppt artificial intelligence historyyy
PianoPianist
 
Smart_Storage_Systems_Production_Engineering.pptx
Smart_Storage_Systems_Production_Engineering.pptxSmart_Storage_Systems_Production_Engineering.pptx
Smart_Storage_Systems_Production_Engineering.pptx
rushikeshnavghare94
 
AI-assisted Software Testing (3-hours tutorial)
AI-assisted Software Testing (3-hours tutorial)AI-assisted Software Testing (3-hours tutorial)
AI-assisted Software Testing (3-hours tutorial)
Vəhid Gəruslu
 
Level 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical SafetyLevel 1-Safety.pptx Presentation of Electrical Safety
Level 1-Safety.pptx Presentation of Electrical Safety
JoseAlbertoCariasDel
 
Introduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptxIntroduction to Zoomlion Earthmoving.pptx
Introduction to Zoomlion Earthmoving.pptx
AS1920
 
Metal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistryMetal alkyne complexes.pptx in chemistry
Metal alkyne complexes.pptx in chemistry
mee23nu
 
Degree_of_Automation.pdf for Instrumentation and industrial specialist
Degree_of_Automation.pdf for  Instrumentation  and industrial specialistDegree_of_Automation.pdf for  Instrumentation  and industrial specialist
Degree_of_Automation.pdf for Instrumentation and industrial specialist
shreyabhosale19
 

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_