SlideShare a Scribd company logo
UNIT TESTING?
 FOR THE REST OF US




                  VLAD ILIESCU
                     MAXCODE
             26 NOVEMBER 2011
INTRO
                 SIMPLE DEMO


      UNIT TESTING?
GUIDELINES
                 ADVANCED DEMO

  JAVASCRIPT
               JAVASCRIPT DEMO
UNIT TESTING?
WHY?
HOW?
NO, REALLY – HOW?
QUESTIONS?
GUIDELINES
A TEST SHOULD BE
            FAST
A TEST SHOULD BE
    INDEPENDENT
A TEST SHOULD BE
        ISOLATED
A TEST SHOULD BE
SELF-DESCRIPTIVE
HOW DO I WRITE
TESTABLE CODE?
QUESTIONS?
WHY
JAVASCRIPT?
BECAUSE OF
SPIDER-MAN
HOW?
NO, REALLY - HOW?
QUESTIONS?
HTTP://MSDN.MICROSOFT.COM/EN-US/LIBRARY/MS243147.ASPX

      HTTP://MSDN.MICROSOFT.COM/EN-US/LIBRARY/MS182530.ASPX

                               HTTP://DOCS.JQUERY.COM/QUNIT

                             HTTPS://GITHUB.COM/JQUERY/QUNIT

      HTTP://MSDN.MICROSOFT.COM/EN-US/SCRIPTJUNKIE/GG749824

                                HTTP://HTML5BOILERPLATE.COM

HTTP://GOOGLETESTING.BLOGSPOT.COM/2008/07/HOW-TO-WRITE-3V1L-
                                     UNTESTABLE-CODE.HTML
COOL KIDS FILL THE
 EVALUATION FORM
THANKS FOR LISTENING!



                   VLAD ILIESCU
                 VLADILIESCU.RO

More Related Content

What's hot

2016 java8-cert-intro
2016 java8-cert-intro2016 java8-cert-intro
2016 java8-cert-intro
Jeanne Boyarsky
 
Why do we need two eyes? - JsConfEu October 2011
Why do we need two eyes? - JsConfEu October 2011Why do we need two eyes? - JsConfEu October 2011
Why do we need two eyes? - JsConfEu October 2011michalbu
 
Looking for a place to hang my helmet
Looking for a place to hang my helmetLooking for a place to hang my helmet
Looking for a place to hang my helmet
Brad Frost
 
A New Hope – the web strikes back
A New Hope – the web strikes backA New Hope – the web strikes back
A New Hope – the web strikes back
Christian Heilmann
 
Testing and updating WordPress - Advanced techniques for avoiding regressions
Testing and updating WordPress - Advanced techniques for avoiding regressionsTesting and updating WordPress - Advanced techniques for avoiding regressions
Testing and updating WordPress - Advanced techniques for avoiding regressions
Otto Kekäläinen
 
Banner ads
Banner adsBanner ads
Banner adspeevanee
 
Langkah meletakkan bahan slideshare di widget embed website FROG
Langkah meletakkan bahan slideshare di widget embed website FROGLangkah meletakkan bahan slideshare di widget embed website FROG
Langkah meletakkan bahan slideshare di widget embed website FROGMohd Khairudin Che Ismail
 

What's hot (7)

2016 java8-cert-intro
2016 java8-cert-intro2016 java8-cert-intro
2016 java8-cert-intro
 
Why do we need two eyes? - JsConfEu October 2011
Why do we need two eyes? - JsConfEu October 2011Why do we need two eyes? - JsConfEu October 2011
Why do we need two eyes? - JsConfEu October 2011
 
Looking for a place to hang my helmet
Looking for a place to hang my helmetLooking for a place to hang my helmet
Looking for a place to hang my helmet
 
A New Hope – the web strikes back
A New Hope – the web strikes backA New Hope – the web strikes back
A New Hope – the web strikes back
 
Testing and updating WordPress - Advanced techniques for avoiding regressions
Testing and updating WordPress - Advanced techniques for avoiding regressionsTesting and updating WordPress - Advanced techniques for avoiding regressions
Testing and updating WordPress - Advanced techniques for avoiding regressions
 
Banner ads
Banner adsBanner ads
Banner ads
 
Langkah meletakkan bahan slideshare di widget embed website FROG
Langkah meletakkan bahan slideshare di widget embed website FROGLangkah meletakkan bahan slideshare di widget embed website FROG
Langkah meletakkan bahan slideshare di widget embed website FROG
 

Viewers also liked

Ionut hrubaru, bogdan lazarescu sql server high availability
Ionut hrubaru, bogdan lazarescu   sql server high availabilityIonut hrubaru, bogdan lazarescu   sql server high availability
Ionut hrubaru, bogdan lazarescu sql server high availability
Codecamp Romania
 
Codecamp iasi-26 nov 2011-web sockets
Codecamp iasi-26 nov 2011-web socketsCodecamp iasi-26 nov 2011-web sockets
Codecamp iasi-26 nov 2011-web socketsCodecamp Romania
 
Scale net apps in aws
Scale net apps in awsScale net apps in aws
Scale net apps in aws
Codecamp Romania
 
Iasi code camp 12 october 2013 shadow dom - mihai bîrsan
Iasi code camp 12 october 2013   shadow dom - mihai bîrsanIasi code camp 12 october 2013   shadow dom - mihai bîrsan
Iasi code camp 12 october 2013 shadow dom - mihai bîrsanCodecamp Romania
 
Sorin Damian - Using and Abusing Dependency Injection Containers
Sorin Damian - Using and Abusing Dependency Injection ContainersSorin Damian - Using and Abusing Dependency Injection Containers
Sorin Damian - Using and Abusing Dependency Injection ContainersCodecamp Romania
 
Iasi code camp 12 october 2013 scrumban - flavia jalaboi-dan nicola
Iasi code camp 12 october 2013   scrumban - flavia jalaboi-dan nicolaIasi code camp 12 october 2013   scrumban - flavia jalaboi-dan nicola
Iasi code camp 12 october 2013 scrumban - flavia jalaboi-dan nicolaCodecamp Romania
 
Stefan stolniceanu spritekit, 2 d or not 2d
Stefan stolniceanu   spritekit, 2 d or not 2dStefan stolniceanu   spritekit, 2 d or not 2d
Stefan stolniceanu spritekit, 2 d or not 2d
Codecamp Romania
 
Sînică Alboaie - Programming for cloud computing Flows of asynchronous messages
Sînică Alboaie - Programming for cloud computing Flows of asynchronous messagesSînică Alboaie - Programming for cloud computing Flows of asynchronous messages
Sînică Alboaie - Programming for cloud computing Flows of asynchronous messagesCodecamp Romania
 

Viewers also liked (8)

Ionut hrubaru, bogdan lazarescu sql server high availability
Ionut hrubaru, bogdan lazarescu   sql server high availabilityIonut hrubaru, bogdan lazarescu   sql server high availability
Ionut hrubaru, bogdan lazarescu sql server high availability
 
Codecamp iasi-26 nov 2011-web sockets
Codecamp iasi-26 nov 2011-web socketsCodecamp iasi-26 nov 2011-web sockets
Codecamp iasi-26 nov 2011-web sockets
 
Scale net apps in aws
Scale net apps in awsScale net apps in aws
Scale net apps in aws
 
Iasi code camp 12 october 2013 shadow dom - mihai bîrsan
Iasi code camp 12 october 2013   shadow dom - mihai bîrsanIasi code camp 12 october 2013   shadow dom - mihai bîrsan
Iasi code camp 12 october 2013 shadow dom - mihai bîrsan
 
Sorin Damian - Using and Abusing Dependency Injection Containers
Sorin Damian - Using and Abusing Dependency Injection ContainersSorin Damian - Using and Abusing Dependency Injection Containers
Sorin Damian - Using and Abusing Dependency Injection Containers
 
Iasi code camp 12 october 2013 scrumban - flavia jalaboi-dan nicola
Iasi code camp 12 october 2013   scrumban - flavia jalaboi-dan nicolaIasi code camp 12 october 2013   scrumban - flavia jalaboi-dan nicola
Iasi code camp 12 october 2013 scrumban - flavia jalaboi-dan nicola
 
Stefan stolniceanu spritekit, 2 d or not 2d
Stefan stolniceanu   spritekit, 2 d or not 2dStefan stolniceanu   spritekit, 2 d or not 2d
Stefan stolniceanu spritekit, 2 d or not 2d
 
Sînică Alboaie - Programming for cloud computing Flows of asynchronous messages
Sînică Alboaie - Programming for cloud computing Flows of asynchronous messagesSînică Alboaie - Programming for cloud computing Flows of asynchronous messages
Sînică Alboaie - Programming for cloud computing Flows of asynchronous messages
 

Similar to Codecamp iasi-26 nov 2011-unit-testing-for-the-rest-of-us

Helen Zhukova "JS static typing. What and why."
Helen Zhukova "JS static typing. What and why."Helen Zhukova "JS static typing. What and why."
Helen Zhukova "JS static typing. What and why."
OdessaJS Conf
 
Designers Make It Go to Eleven!
Designers Make It Go to Eleven!Designers Make It Go to Eleven!
Designers Make It Go to Eleven!
Idan Gazit
 
Stripes RJUG March 2012
Stripes RJUG March 2012Stripes RJUG March 2012
Stripes RJUG March 2012
timstone
 
NodeJS for Novices - 28/Oct/13 - Winnipeg, MB
NodeJS for Novices - 28/Oct/13 - Winnipeg, MBNodeJS for Novices - 28/Oct/13 - Winnipeg, MB
NodeJS for Novices - 28/Oct/13 - Winnipeg, MBDavid Wesst
 
4-identifying-problems.pdf
4-identifying-problems.pdf4-identifying-problems.pdf
4-identifying-problems.pdf
Brian Rahmawan Purwoto
 
Developer Productivity with Forge, Java EE 6 and Arquillian
Developer Productivity with Forge, Java EE 6 and ArquillianDeveloper Productivity with Forge, Java EE 6 and Arquillian
Developer Productivity with Forge, Java EE 6 and Arquillian
Ray Ploski
 
State of Akka 2017 - The best is yet to come
State of Akka 2017 - The best is yet to comeState of Akka 2017 - The best is yet to come
State of Akka 2017 - The best is yet to come
Konrad Malawski
 
Api pain points
Api pain pointsApi pain points
Api pain points
Phil Sturgeon
 
JavaScript For People Who Don't Code
JavaScript For People Who Don't CodeJavaScript For People Who Don't Code
JavaScript For People Who Don't CodeChristopher Schmitt
 
Prototyping: Helping to take away the suck
Prototyping: Helping to take away the suckPrototyping: Helping to take away the suck
Prototyping: Helping to take away the suck
Harvard Web Working Group
 
JsDay - It's not you, It's me (or how to avoid being coupled with a Javascrip...
JsDay - It's not you, It's me (or how to avoid being coupled with a Javascrip...JsDay - It's not you, It's me (or how to avoid being coupled with a Javascrip...
JsDay - It's not you, It's me (or how to avoid being coupled with a Javascrip...
Marco Cedaro
 
FFWD.PRO - It's not you, It's me (or how to avoid being coupled with a Javasc...
FFWD.PRO - It's not you, It's me (or how to avoid being coupled with a Javasc...FFWD.PRO - It's not you, It's me (or how to avoid being coupled with a Javasc...
FFWD.PRO - It's not you, It's me (or how to avoid being coupled with a Javasc...
Marco Cedaro
 
Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024
Soroosh Khodami
 
Алексей Демедецкий | Unit testing in swift
Алексей Демедецкий | Unit testing in swiftАлексей Демедецкий | Unit testing in swift
Алексей Демедецкий | Unit testing in swift
Fwdays
 
Joys and Pains of Node.js in the Enterprise
Joys and Pains of Node.js in the EnterpriseJoys and Pains of Node.js in the Enterprise
Joys and Pains of Node.js in the Enterprise
Marc Fasel
 
Web Systems Architecture by Moshe Kaplan
Web Systems Architecture by Moshe KaplanWeb Systems Architecture by Moshe Kaplan
Web Systems Architecture by Moshe Kaplan
Moshe Kaplan
 
Fast Slim Correct: The History and Evolution of JavaScript.
Fast Slim Correct: The History and Evolution of JavaScript.Fast Slim Correct: The History and Evolution of JavaScript.
Fast Slim Correct: The History and Evolution of JavaScript.
John Dalziel
 
Stefan Judis "Did we(b development) lose the right direction?"
Stefan Judis "Did we(b development) lose the right direction?"Stefan Judis "Did we(b development) lose the right direction?"
Stefan Judis "Did we(b development) lose the right direction?"
Fwdays
 
JavaScript Crash Course | Edureka
JavaScript Crash Course | EdurekaJavaScript Crash Course | Edureka
JavaScript Crash Course | Edureka
Edureka!
 

Similar to Codecamp iasi-26 nov 2011-unit-testing-for-the-rest-of-us (20)

Helen Zhukova "JS static typing. What and why."
Helen Zhukova "JS static typing. What and why."Helen Zhukova "JS static typing. What and why."
Helen Zhukova "JS static typing. What and why."
 
Designers Make It Go to Eleven!
Designers Make It Go to Eleven!Designers Make It Go to Eleven!
Designers Make It Go to Eleven!
 
Stripes RJUG March 2012
Stripes RJUG March 2012Stripes RJUG March 2012
Stripes RJUG March 2012
 
NodeJS for Novices - 28/Oct/13 - Winnipeg, MB
NodeJS for Novices - 28/Oct/13 - Winnipeg, MBNodeJS for Novices - 28/Oct/13 - Winnipeg, MB
NodeJS for Novices - 28/Oct/13 - Winnipeg, MB
 
4-identifying-problems.pdf
4-identifying-problems.pdf4-identifying-problems.pdf
4-identifying-problems.pdf
 
Developer Productivity with Forge, Java EE 6 and Arquillian
Developer Productivity with Forge, Java EE 6 and ArquillianDeveloper Productivity with Forge, Java EE 6 and Arquillian
Developer Productivity with Forge, Java EE 6 and Arquillian
 
State of Akka 2017 - The best is yet to come
State of Akka 2017 - The best is yet to comeState of Akka 2017 - The best is yet to come
State of Akka 2017 - The best is yet to come
 
Api pain points
Api pain pointsApi pain points
Api pain points
 
JavaScript For People Who Don't Code
JavaScript For People Who Don't CodeJavaScript For People Who Don't Code
JavaScript For People Who Don't Code
 
Api pain points
Api pain pointsApi pain points
Api pain points
 
Prototyping: Helping to take away the suck
Prototyping: Helping to take away the suckPrototyping: Helping to take away the suck
Prototyping: Helping to take away the suck
 
JsDay - It's not you, It's me (or how to avoid being coupled with a Javascrip...
JsDay - It's not you, It's me (or how to avoid being coupled with a Javascrip...JsDay - It's not you, It's me (or how to avoid being coupled with a Javascrip...
JsDay - It's not you, It's me (or how to avoid being coupled with a Javascrip...
 
FFWD.PRO - It's not you, It's me (or how to avoid being coupled with a Javasc...
FFWD.PRO - It's not you, It's me (or how to avoid being coupled with a Javasc...FFWD.PRO - It's not you, It's me (or how to avoid being coupled with a Javasc...
FFWD.PRO - It's not you, It's me (or how to avoid being coupled with a Javasc...
 
Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024
 
Алексей Демедецкий | Unit testing in swift
Алексей Демедецкий | Unit testing in swiftАлексей Демедецкий | Unit testing in swift
Алексей Демедецкий | Unit testing in swift
 
Joys and Pains of Node.js in the Enterprise
Joys and Pains of Node.js in the EnterpriseJoys and Pains of Node.js in the Enterprise
Joys and Pains of Node.js in the Enterprise
 
Web Systems Architecture by Moshe Kaplan
Web Systems Architecture by Moshe KaplanWeb Systems Architecture by Moshe Kaplan
Web Systems Architecture by Moshe Kaplan
 
Fast Slim Correct: The History and Evolution of JavaScript.
Fast Slim Correct: The History and Evolution of JavaScript.Fast Slim Correct: The History and Evolution of JavaScript.
Fast Slim Correct: The History and Evolution of JavaScript.
 
Stefan Judis "Did we(b development) lose the right direction?"
Stefan Judis "Did we(b development) lose the right direction?"Stefan Judis "Did we(b development) lose the right direction?"
Stefan Judis "Did we(b development) lose the right direction?"
 
JavaScript Crash Course | Edureka
JavaScript Crash Course | EdurekaJavaScript Crash Course | Edureka
JavaScript Crash Course | Edureka
 

More from Codecamp Romania

Cezar chitac the edge of experience
Cezar chitac   the edge of experienceCezar chitac   the edge of experience
Cezar chitac the edge of experience
Codecamp Romania
 
Cloud powered search
Cloud powered searchCloud powered search
Cloud powered search
Codecamp Romania
 
Business analysis techniques exercise your 6-pack
Business analysis techniques   exercise your 6-packBusiness analysis techniques   exercise your 6-pack
Business analysis techniques exercise your 6-pack
Codecamp Romania
 
Bpm company code camp - configuration or coding with pega
Bpm company   code camp - configuration or coding with pegaBpm company   code camp - configuration or coding with pega
Bpm company code camp - configuration or coding with pega
Codecamp Romania
 
Andrei prisacaru takingtheunitteststothedatabase
Andrei prisacaru takingtheunitteststothedatabaseAndrei prisacaru takingtheunitteststothedatabase
Andrei prisacaru takingtheunitteststothedatabase
Codecamp Romania
 
Agility and life
Agility and lifeAgility and life
Agility and life
Codecamp Romania
 
2015 dan ardelean develop for windows 10
2015 dan ardelean   develop for windows 10 2015 dan ardelean   develop for windows 10
2015 dan ardelean develop for windows 10
Codecamp Romania
 
The bigrewrite
The bigrewriteThe bigrewrite
The bigrewrite
Codecamp Romania
 
The case for continuous delivery
The case for continuous deliveryThe case for continuous delivery
The case for continuous delivery
Codecamp Romania
 
Sizing epics tales from an agile kingdom
Sizing epics   tales from an agile kingdomSizing epics   tales from an agile kingdom
Sizing epics tales from an agile kingdom
Codecamp Romania
 
Raluca butnaru corina cilibiu the unknown universe of a product and the cer...
Raluca butnaru corina cilibiu   the unknown universe of a product and the cer...Raluca butnaru corina cilibiu   the unknown universe of a product and the cer...
Raluca butnaru corina cilibiu the unknown universe of a product and the cer...
Codecamp Romania
 
Parallel & async processing using tpl dataflow
Parallel & async processing using tpl dataflowParallel & async processing using tpl dataflow
Parallel & async processing using tpl dataflow
Codecamp Romania
 
Material design screen transitions in android
Material design screen transitions in androidMaterial design screen transitions in android
Material design screen transitions in android
Codecamp Romania
 
Kickstart your own freelancing career
Kickstart your own freelancing careerKickstart your own freelancing career
Kickstart your own freelancing career
Codecamp Romania
 
Ionut grecu the soft stuff is the hard stuff. the agile soft skills toolkit
Ionut grecu   the soft stuff is the hard stuff. the agile soft skills toolkitIonut grecu   the soft stuff is the hard stuff. the agile soft skills toolkit
Ionut grecu the soft stuff is the hard stuff. the agile soft skills toolkit
Codecamp Romania
 
Ecma6 in the wild
Ecma6 in the wildEcma6 in the wild
Ecma6 in the wild
Codecamp Romania
 
Diana antohi me against myself or how to fail and move forward
Diana antohi   me against myself  or how to fail  and move forwardDiana antohi   me against myself  or how to fail  and move forward
Diana antohi me against myself or how to fail and move forward
Codecamp Romania
 
Codecamp2015 pimp yourpipeline-saade-jens-1.1
Codecamp2015 pimp yourpipeline-saade-jens-1.1Codecamp2015 pimp yourpipeline-saade-jens-1.1
Codecamp2015 pimp yourpipeline-saade-jens-1.1
Codecamp Romania
 
Code camp iasi silviu niculita - machine learning for mere mortals with azu...
Code camp iasi   silviu niculita - machine learning for mere mortals with azu...Code camp iasi   silviu niculita - machine learning for mere mortals with azu...
Code camp iasi silviu niculita - machine learning for mere mortals with azu...
Codecamp Romania
 

More from Codecamp Romania (20)

Cezar chitac the edge of experience
Cezar chitac   the edge of experienceCezar chitac   the edge of experience
Cezar chitac the edge of experience
 
Cloud powered search
Cloud powered searchCloud powered search
Cloud powered search
 
Ccp
CcpCcp
Ccp
 
Business analysis techniques exercise your 6-pack
Business analysis techniques   exercise your 6-packBusiness analysis techniques   exercise your 6-pack
Business analysis techniques exercise your 6-pack
 
Bpm company code camp - configuration or coding with pega
Bpm company   code camp - configuration or coding with pegaBpm company   code camp - configuration or coding with pega
Bpm company code camp - configuration or coding with pega
 
Andrei prisacaru takingtheunitteststothedatabase
Andrei prisacaru takingtheunitteststothedatabaseAndrei prisacaru takingtheunitteststothedatabase
Andrei prisacaru takingtheunitteststothedatabase
 
Agility and life
Agility and lifeAgility and life
Agility and life
 
2015 dan ardelean develop for windows 10
2015 dan ardelean   develop for windows 10 2015 dan ardelean   develop for windows 10
2015 dan ardelean develop for windows 10
 
The bigrewrite
The bigrewriteThe bigrewrite
The bigrewrite
 
The case for continuous delivery
The case for continuous deliveryThe case for continuous delivery
The case for continuous delivery
 
Sizing epics tales from an agile kingdom
Sizing epics   tales from an agile kingdomSizing epics   tales from an agile kingdom
Sizing epics tales from an agile kingdom
 
Raluca butnaru corina cilibiu the unknown universe of a product and the cer...
Raluca butnaru corina cilibiu   the unknown universe of a product and the cer...Raluca butnaru corina cilibiu   the unknown universe of a product and the cer...
Raluca butnaru corina cilibiu the unknown universe of a product and the cer...
 
Parallel & async processing using tpl dataflow
Parallel & async processing using tpl dataflowParallel & async processing using tpl dataflow
Parallel & async processing using tpl dataflow
 
Material design screen transitions in android
Material design screen transitions in androidMaterial design screen transitions in android
Material design screen transitions in android
 
Kickstart your own freelancing career
Kickstart your own freelancing careerKickstart your own freelancing career
Kickstart your own freelancing career
 
Ionut grecu the soft stuff is the hard stuff. the agile soft skills toolkit
Ionut grecu   the soft stuff is the hard stuff. the agile soft skills toolkitIonut grecu   the soft stuff is the hard stuff. the agile soft skills toolkit
Ionut grecu the soft stuff is the hard stuff. the agile soft skills toolkit
 
Ecma6 in the wild
Ecma6 in the wildEcma6 in the wild
Ecma6 in the wild
 
Diana antohi me against myself or how to fail and move forward
Diana antohi   me against myself  or how to fail  and move forwardDiana antohi   me against myself  or how to fail  and move forward
Diana antohi me against myself or how to fail and move forward
 
Codecamp2015 pimp yourpipeline-saade-jens-1.1
Codecamp2015 pimp yourpipeline-saade-jens-1.1Codecamp2015 pimp yourpipeline-saade-jens-1.1
Codecamp2015 pimp yourpipeline-saade-jens-1.1
 
Code camp iasi silviu niculita - machine learning for mere mortals with azu...
Code camp iasi   silviu niculita - machine learning for mere mortals with azu...Code camp iasi   silviu niculita - machine learning for mere mortals with azu...
Code camp iasi silviu niculita - machine learning for mere mortals with azu...
 

Recently uploaded

Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 

Recently uploaded (20)

Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 

Codecamp iasi-26 nov 2011-unit-testing-for-the-rest-of-us

Editor's Notes

  1. AGENDAIntroducere (why/how)Demo simplu (OPTIONAL)GuidelinesDemo avansat (IOC)Introtestare in JavascriptDemo Javascript
  2. Unit testing-ul se refera la testarea automata (prin cod) a unorbucati de cod.Existamaimultetipuri de teste in afara de unit tests: integration tests (testeazafelul in care lucreazaimpreunamaimulte module ale aplicatiei), performance tests (cat de repederuleazaanumitebucati de cod), load tests (cat de bine functioneazaaplicatiaatuncicandcrestenivelul de incarcare al acesteia). Prin unit test intelegem un test care testeaza o unitate, ceamai mica bucata de funtionalitatepe care o putemtesta. De obiceiastainseamna o clasa - in mod ideal artrebuisaputemsatestamfiecareclasa in mod izolat, fara a ne atinge de dependinteleeiexterne.
  3. Asigura o plasa de siguranta in cazul schimbarilor (detaliat cazul refactoring-ului proposal-urilor).Documenteaza codul - examinand un unit test, putem vedea cum se foloseste codul pe care acesta il testeaza.Design - daca o metoda e greu de testat, poate indica o problema cu design-ul acesteia. Poate metoda incearca sa faca prea mult, poate ar trebui extrase dependintele externe, etc.Cum testele sunt rulate de calculator, ele se executa mult mai repede si pot fi rulate in mod repetat - devine mult mai usor sa prindem erorile introduse.
  4. Setup, Run, AssertUn test consta din acesti 3 pasi. Initial definimpreconditiile (setup), apoirulamcodulpe care vremsailtestam (run), dupa care verificamexactitatearezultatelor (assert).
  5. demo
  6. Un test ar trebui sa ruleze repede pentru ca se va executa de multe ori. daca testele nu sunt rapide, echipa nu o sa le ruleze.
  7. Rezultateleunui test nu artrebuisadepinda de cealteteste s-au rulatinainteaacestuia. Inclusivvariabilelepartajate de maimultetesteartrebuiinitializate de fiecare data, pentru a se evitarezultateneasteptate.
  8. Un test nu artrebuisadepinda de fisiereexterne, baze de date, servere de email, data siora, web service-uri, etc.El artrebuisatestezelogica. Dependinteleexterneartrebuisa fie simulate.Un test poatesatesteze in mod explicit interactiunea cu fisiereexterne, baze de date, servere de email, web service-uri, etc. Dar atuncidevine o altacategorie de test, e integration test.
  9. Numelemetodelortrebuiesadescrieclarce se testeaza.Cand un test pica, trebuiesa fie usor de intelesce nu functioneaza.Casaintelegcetesteaza testAssignMembership1(), testAssignMembership2() artrebuisainspectezcodullor.
  10. In primul rand nu testez tot, doar codul care contine logica si pe care ma astept sa il modific in viitor.Single Responsibility Principle si Dependency Injection O clasaartrebuisafaca un singurlucru. Logicaaditionala o scoatem in afara, in dependinte, pe care le injectam.In felulasta, un test poatetesta un singurlucru, iardependintele pot fi simulate prin mocks si stubs Stubs - clase helper scrise de noi care implementeazainterfetelefolosite de codultestatsi care nu facnimic, Mocks - clase care implementeazainterfetelefolosite de codultestat, dar care continsilogica de testare a comportamentului - ex, de cateori s-a apelat o anumitametoda, ordinealor de apel, etc. Personal, prefer stubs pentrucaaltfeltestelestiupreamultedesprecodultestatsidevinastfelfoarte fragile (la oricemodificare in codultestat, eleriscasa crape).
  11. Folosim din ce in cemaimult javascript in aplicatiilenoastre, siimplementam din ce in cemaimultalogica in el. In plus limbajul nu e precompilat, decinicimacar nu stimsigurca tot codulscrisvaputea fi executat cu succes.Asadar,risculintroducerii de eroricrestedestul de mult. Daca am testamacarzonelemai intensive din punct de vedere al logicii, am reduce o parte din problemeleacestea.
  12. With great power comes great responsibilit
  13. QUnitestelibrariafolosita de proiectul jQuery pentru a isitestacodul. Este unul din celemaipopulare framework-uri de testare javascript. Are un apidestul de simplusiusor de folosit. Nu se integreaza implicit cu aplicatiiconsola, darofera un mod standard de prezentare a rezultatelor.
  14. demo