SlideShare une entreprise Scribd logo
1  sur  12
TDD  in the  Web  with  Python XP Conference 2011 Carlos Blé www.carlosble.com @carlosble
The Architecture Ruby on Rails,  Django , Monorail, ASP.Net MVC, Spring MVC, Play Framework, Symphony, Zend Framework...
We like to think like this
Separate concerns Controller : Deals with the  browser .  Get the input, make some calls and return the output . It should be as  simple  as possible.  The less it knows about the domain, the better. View : Renders UI.  Doesn't know the domain at all!!! Domain : Deals with the  user . Business requirements.  Wouldn't be cool if we can exercise the domain using ”end-to-end” tests?
Test-driving Inside-out  (bottom-up) So we can test-drive the domain and invoke it from the controller after all, like this: Now we can write an integration test for this controller...  but integration tests are painful!
Is not that clean always  :-(
When the  controller  needs to  know ,[object Object]
How to parse complex data (forms)
Which UI to render for a given scenario We end up with a mess :-(
Test-driving Outside-in  (top-down) Integration tests are a scam. Let's go ” unit” We don't use Django's TestCase, but unittest's
Replacing with test doubles
Replace   conditional   with   polymorphism We can move conditionals from views to controllers

Contenu connexe

Tendances

Automated Web Testing using JavaScript
Automated Web Testing using JavaScriptAutomated Web Testing using JavaScript
Automated Web Testing using JavaScriptSimon Guest
 
Ember.js Brussels Meetup #3 - Testing your Ember.js app
Ember.js Brussels Meetup #3 - Testing your Ember.js appEmber.js Brussels Meetup #3 - Testing your Ember.js app
Ember.js Brussels Meetup #3 - Testing your Ember.js appyoranbe
 
Introducing Ghost Inspector
Introducing Ghost InspectorIntroducing Ghost Inspector
Introducing Ghost InspectorNeil Mansilla
 
Tdd final submission
Tdd final submissionTdd final submission
Tdd final submissionharshit040591
 
Automating JavaScript testing with Jasmine and Perl
Automating JavaScript testing with Jasmine and PerlAutomating JavaScript testing with Jasmine and Perl
Automating JavaScript testing with Jasmine and Perlnohuhu
 
Unit testing for User Interfaces
Unit testing for User InterfacesUnit testing for User Interfaces
Unit testing for User Interfaceswebmull
 
Introduction to Integration Testing With Cypress
Introduction to Integration Testing With CypressIntroduction to Integration Testing With Cypress
Introduction to Integration Testing With CypressErez Cohen
 
Introduction to Functional Reactive Programming
Introduction to Functional Reactive ProgrammingIntroduction to Functional Reactive Programming
Introduction to Functional Reactive ProgrammingĐặng Thái Sơn
 
Increasing performance with Elixir Tasks
Increasing performance with Elixir TasksIncreasing performance with Elixir Tasks
Increasing performance with Elixir TasksJeffrey Chan
 
FITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript DebuggingFITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript DebuggingRami Sayar
 
Making cross browser tests beautiful
Making cross browser tests beautifulMaking cross browser tests beautiful
Making cross browser tests beautifulMeaghan Lewis
 
Learn Elixir at Manchester Lambda Lounge
Learn Elixir at Manchester Lambda LoungeLearn Elixir at Manchester Lambda Lounge
Learn Elixir at Manchester Lambda LoungeChi-chi Ekweozor
 
It's just Angular
It's just AngularIt's just Angular
It's just AngularVinci Rufus
 
AngularJS and Protractor
AngularJS and ProtractorAngularJS and Protractor
AngularJS and ProtractorFilipe Falcão
 
Async CTP 3 Presentation for MUGH 2012
Async CTP 3 Presentation for MUGH 2012Async CTP 3 Presentation for MUGH 2012
Async CTP 3 Presentation for MUGH 2012Sri Kanth
 
Herding a Cat with Antlers - Catalyst 5.80
Herding a Cat with Antlers - Catalyst 5.80Herding a Cat with Antlers - Catalyst 5.80
Herding a Cat with Antlers - Catalyst 5.80Tomas Doran
 

Tendances (20)

Padre user experience
Padre user experiencePadre user experience
Padre user experience
 
Automated Web Testing using JavaScript
Automated Web Testing using JavaScriptAutomated Web Testing using JavaScript
Automated Web Testing using JavaScript
 
Ember.js Brussels Meetup #3 - Testing your Ember.js app
Ember.js Brussels Meetup #3 - Testing your Ember.js appEmber.js Brussels Meetup #3 - Testing your Ember.js app
Ember.js Brussels Meetup #3 - Testing your Ember.js app
 
Introducing Ghost Inspector
Introducing Ghost InspectorIntroducing Ghost Inspector
Introducing Ghost Inspector
 
Automating android
Automating androidAutomating android
Automating android
 
Tdd final submission
Tdd final submissionTdd final submission
Tdd final submission
 
Automating JavaScript testing with Jasmine and Perl
Automating JavaScript testing with Jasmine and PerlAutomating JavaScript testing with Jasmine and Perl
Automating JavaScript testing with Jasmine and Perl
 
Unit testing for User Interfaces
Unit testing for User InterfacesUnit testing for User Interfaces
Unit testing for User Interfaces
 
Introduction to Integration Testing With Cypress
Introduction to Integration Testing With CypressIntroduction to Integration Testing With Cypress
Introduction to Integration Testing With Cypress
 
Introduction to Functional Reactive Programming
Introduction to Functional Reactive ProgrammingIntroduction to Functional Reactive Programming
Introduction to Functional Reactive Programming
 
Increasing performance with Elixir Tasks
Increasing performance with Elixir TasksIncreasing performance with Elixir Tasks
Increasing performance with Elixir Tasks
 
FITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript DebuggingFITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript Debugging
 
Making cross browser tests beautiful
Making cross browser tests beautifulMaking cross browser tests beautiful
Making cross browser tests beautiful
 
Learn Elixir at Manchester Lambda Lounge
Learn Elixir at Manchester Lambda LoungeLearn Elixir at Manchester Lambda Lounge
Learn Elixir at Manchester Lambda Lounge
 
It's just Angular
It's just AngularIt's just Angular
It's just Angular
 
Play Framework
Play FrameworkPlay Framework
Play Framework
 
AngularJS and Protractor
AngularJS and ProtractorAngularJS and Protractor
AngularJS and Protractor
 
Angular Unit Testing
Angular Unit TestingAngular Unit Testing
Angular Unit Testing
 
Async CTP 3 Presentation for MUGH 2012
Async CTP 3 Presentation for MUGH 2012Async CTP 3 Presentation for MUGH 2012
Async CTP 3 Presentation for MUGH 2012
 
Herding a Cat with Antlers - Catalyst 5.80
Herding a Cat with Antlers - Catalyst 5.80Herding a Cat with Antlers - Catalyst 5.80
Herding a Cat with Antlers - Catalyst 5.80
 

En vedette

Big data amb Cassandra i Celery ##bbmnk
Big data amb Cassandra i Celery ##bbmnkBig data amb Cassandra i Celery ##bbmnk
Big data amb Cassandra i Celery ##bbmnkSanti Camps
 
El arte oscuro de estimar v3
El arte oscuro de estimar v3El arte oscuro de estimar v3
El arte oscuro de estimar v3Leonardo Soto
 
Introduccio a python
Introduccio a pythonIntroduccio a python
Introduccio a pythonSanti Camps
 
STM on PyPy
STM on PyPySTM on PyPy
STM on PyPyfcofdezc
 
Conferencia Big Data en #MenorcaConnecta
Conferencia Big Data en #MenorcaConnectaConferencia Big Data en #MenorcaConnecta
Conferencia Big Data en #MenorcaConnectaSanti Camps
 
#DataBeers: Inmersive Data Visualization con Oculus Rift
#DataBeers: Inmersive Data Visualization con Oculus Rift#DataBeers: Inmersive Data Visualization con Oculus Rift
#DataBeers: Inmersive Data Visualization con Oculus RiftOutliers Collective
 
A Folksonomy of styles, aka: other stylists also said and Subjective Influenc...
A Folksonomy of styles, aka: other stylists also said and Subjective Influenc...A Folksonomy of styles, aka: other stylists also said and Subjective Influenc...
A Folksonomy of styles, aka: other stylists also said and Subjective Influenc...Natalia Díaz Rodríguez
 
Python Dominicana 059: Django Migrations
Python Dominicana 059: Django MigrationsPython Dominicana 059: Django Migrations
Python Dominicana 059: Django MigrationsRafael Belliard
 
Transparencias taller Python
Transparencias taller PythonTransparencias taller Python
Transparencias taller PythonSergio Soto
 
Knowing your garbage collector - PyCon Italy 2015
Knowing your garbage collector - PyCon Italy 2015Knowing your garbage collector - PyCon Italy 2015
Knowing your garbage collector - PyCon Italy 2015fcofdezc
 
Volunteering assistance to online geocoding services through a distributed kn...
Volunteering assistance to online geocoding services through a distributed kn...Volunteering assistance to online geocoding services through a distributed kn...
Volunteering assistance to online geocoding services through a distributed kn...José Pablo Gómez Barrón S.
 
Knowing your Garbage Collector / Python Madrid
Knowing your Garbage Collector / Python MadridKnowing your Garbage Collector / Python Madrid
Knowing your Garbage Collector / Python Madridfcofdezc
 
BDD - Test Academy Barcelona 2017
BDD - Test Academy Barcelona 2017BDD - Test Academy Barcelona 2017
BDD - Test Academy Barcelona 2017Carlos Ble
 

En vedette (20)

Big data amb Cassandra i Celery ##bbmnk
Big data amb Cassandra i Celery ##bbmnkBig data amb Cassandra i Celery ##bbmnk
Big data amb Cassandra i Celery ##bbmnk
 
The emerging world of mongo db csp
The emerging world of mongo db   cspThe emerging world of mongo db   csp
The emerging world of mongo db csp
 
El arte oscuro de estimar v3
El arte oscuro de estimar v3El arte oscuro de estimar v3
El arte oscuro de estimar v3
 
Introduccio a python
Introduccio a pythonIntroduccio a python
Introduccio a python
 
STM on PyPy
STM on PyPySTM on PyPy
STM on PyPy
 
Conferencia Big Data en #MenorcaConnecta
Conferencia Big Data en #MenorcaConnectaConferencia Big Data en #MenorcaConnecta
Conferencia Big Data en #MenorcaConnecta
 
Zotero
ZoteroZotero
Zotero
 
Python 101
Python 101Python 101
Python 101
 
Madrid SPARQL handson
Madrid SPARQL handsonMadrid SPARQL handson
Madrid SPARQL handson
 
Python and MongoDB
Python and MongoDB Python and MongoDB
Python and MongoDB
 
#DataBeers: Inmersive Data Visualization con Oculus Rift
#DataBeers: Inmersive Data Visualization con Oculus Rift#DataBeers: Inmersive Data Visualization con Oculus Rift
#DataBeers: Inmersive Data Visualization con Oculus Rift
 
A Folksonomy of styles, aka: other stylists also said and Subjective Influenc...
A Folksonomy of styles, aka: other stylists also said and Subjective Influenc...A Folksonomy of styles, aka: other stylists also said and Subjective Influenc...
A Folksonomy of styles, aka: other stylists also said and Subjective Influenc...
 
Python Dominicana 059: Django Migrations
Python Dominicana 059: Django MigrationsPython Dominicana 059: Django Migrations
Python Dominicana 059: Django Migrations
 
10 cosas de rails que deberías saber
10 cosas de rails que deberías saber10 cosas de rails que deberías saber
10 cosas de rails que deberías saber
 
Transparencias taller Python
Transparencias taller PythonTransparencias taller Python
Transparencias taller Python
 
Knowing your garbage collector - PyCon Italy 2015
Knowing your garbage collector - PyCon Italy 2015Knowing your garbage collector - PyCon Italy 2015
Knowing your garbage collector - PyCon Italy 2015
 
Volunteering assistance to online geocoding services through a distributed kn...
Volunteering assistance to online geocoding services through a distributed kn...Volunteering assistance to online geocoding services through a distributed kn...
Volunteering assistance to online geocoding services through a distributed kn...
 
Knowing your Garbage Collector / Python Madrid
Knowing your Garbage Collector / Python MadridKnowing your Garbage Collector / Python Madrid
Knowing your Garbage Collector / Python Madrid
 
Tidy vews, decorator and presenter
Tidy vews, decorator and presenterTidy vews, decorator and presenter
Tidy vews, decorator and presenter
 
BDD - Test Academy Barcelona 2017
BDD - Test Academy Barcelona 2017BDD - Test Academy Barcelona 2017
BDD - Test Academy Barcelona 2017
 

Similaire à TDD in the Web with Python and Django

AWS Lambda from the trenches
AWS Lambda from the trenchesAWS Lambda from the trenches
AWS Lambda from the trenchesYan Cui
 
Zero to tested
Zero to testedZero to tested
Zero to testedMagenTys
 
Agile JavaScript Testing
Agile JavaScript TestingAgile JavaScript Testing
Agile JavaScript TestingScott Becker
 
Uber Mobility Meetup: Mobile Testing
Uber Mobility Meetup:  Mobile TestingUber Mobility Meetup:  Mobile Testing
Uber Mobility Meetup: Mobile TestingApple Chow
 
DevOps, A brief introduction to Vagrant & Ansible
DevOps, A brief introduction to Vagrant & AnsibleDevOps, A brief introduction to Vagrant & Ansible
DevOps, A brief introduction to Vagrant & AnsibleArnaud LEMAIRE
 
Node.js meetup 17.05.2017 ember.js - escape the javascript fatigue
Node.js meetup 17.05.2017   ember.js - escape the javascript fatigueNode.js meetup 17.05.2017   ember.js - escape the javascript fatigue
Node.js meetup 17.05.2017 ember.js - escape the javascript fatigueTobias Braner
 
Serverless in Production, an experience report (cloudXchange)
Serverless in Production, an experience report (cloudXchange)Serverless in Production, an experience report (cloudXchange)
Serverless in Production, an experience report (cloudXchange)Yan Cui
 
Serverless in production, an experience report (CoDe-Conf)
Serverless in production, an experience report (CoDe-Conf)Serverless in production, an experience report (CoDe-Conf)
Serverless in production, an experience report (CoDe-Conf)Yan Cui
 
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...Ambassador Labs
 
Serverless in production, an experience report (LNUG)
Serverless in production, an experience report (LNUG)Serverless in production, an experience report (LNUG)
Serverless in production, an experience report (LNUG)Yan Cui
 
GeeCON 2012 hurdle run through ejb testing
GeeCON 2012 hurdle run through ejb testingGeeCON 2012 hurdle run through ejb testing
GeeCON 2012 hurdle run through ejb testingJakub Marchwicki
 
Road to sbt 1.0 paved with server
Road to sbt 1.0   paved with serverRoad to sbt 1.0   paved with server
Road to sbt 1.0 paved with serverEugene Yokota
 
Serverless in production, an experience report (Going Serverless)
Serverless in production, an experience report (Going Serverless)Serverless in production, an experience report (Going Serverless)
Serverless in production, an experience report (Going Serverless)Yan Cui
 
Serverless in production (O'Reilly Software Architecture)
Serverless in production (O'Reilly Software Architecture)Serverless in production (O'Reilly Software Architecture)
Serverless in production (O'Reilly Software Architecture)Yan Cui
 
Graceful Failure with Selenium and Continuous Integration
Graceful Failure with Selenium and Continuous IntegrationGraceful Failure with Selenium and Continuous Integration
Graceful Failure with Selenium and Continuous IntegrationChris B. France
 
Serverless in production, an experience report (JeffConf)
Serverless in production, an experience report (JeffConf)Serverless in production, an experience report (JeffConf)
Serverless in production, an experience report (JeffConf)Yan Cui
 
Do it Yourself Testing
Do it Yourself TestingDo it Yourself Testing
Do it Yourself TestingEmily Stolfo
 
Testing of React JS app
Testing of React JS appTesting of React JS app
Testing of React JS appAleks Zinevych
 
Serverless in production, an experience report (linuxing in london)
Serverless in production, an experience report (linuxing in london)Serverless in production, an experience report (linuxing in london)
Serverless in production, an experience report (linuxing in london)Yan Cui
 

Similaire à TDD in the Web with Python and Django (20)

AWS Lambda from the trenches
AWS Lambda from the trenchesAWS Lambda from the trenches
AWS Lambda from the trenches
 
Zero to tested
Zero to testedZero to tested
Zero to tested
 
Agile JavaScript Testing
Agile JavaScript TestingAgile JavaScript Testing
Agile JavaScript Testing
 
Uber Mobility Meetup: Mobile Testing
Uber Mobility Meetup:  Mobile TestingUber Mobility Meetup:  Mobile Testing
Uber Mobility Meetup: Mobile Testing
 
DevOps, A brief introduction to Vagrant & Ansible
DevOps, A brief introduction to Vagrant & AnsibleDevOps, A brief introduction to Vagrant & Ansible
DevOps, A brief introduction to Vagrant & Ansible
 
Node.js meetup 17.05.2017 ember.js - escape the javascript fatigue
Node.js meetup 17.05.2017   ember.js - escape the javascript fatigueNode.js meetup 17.05.2017   ember.js - escape the javascript fatigue
Node.js meetup 17.05.2017 ember.js - escape the javascript fatigue
 
Serverless in Production, an experience report (cloudXchange)
Serverless in Production, an experience report (cloudXchange)Serverless in Production, an experience report (cloudXchange)
Serverless in Production, an experience report (cloudXchange)
 
Serverless in production, an experience report (CoDe-Conf)
Serverless in production, an experience report (CoDe-Conf)Serverless in production, an experience report (CoDe-Conf)
Serverless in production, an experience report (CoDe-Conf)
 
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
[KubeCon NA 2018] Telepresence Deep Dive Session - Rafael Schloming & Luke Sh...
 
Serverless in production, an experience report (LNUG)
Serverless in production, an experience report (LNUG)Serverless in production, an experience report (LNUG)
Serverless in production, an experience report (LNUG)
 
GeeCON 2012 hurdle run through ejb testing
GeeCON 2012 hurdle run through ejb testingGeeCON 2012 hurdle run through ejb testing
GeeCON 2012 hurdle run through ejb testing
 
Road to sbt 1.0 paved with server
Road to sbt 1.0   paved with serverRoad to sbt 1.0   paved with server
Road to sbt 1.0 paved with server
 
Serverless in production, an experience report (Going Serverless)
Serverless in production, an experience report (Going Serverless)Serverless in production, an experience report (Going Serverless)
Serverless in production, an experience report (Going Serverless)
 
Serverless in production (O'Reilly Software Architecture)
Serverless in production (O'Reilly Software Architecture)Serverless in production (O'Reilly Software Architecture)
Serverless in production (O'Reilly Software Architecture)
 
Tdd is not about testing
Tdd is not about testingTdd is not about testing
Tdd is not about testing
 
Graceful Failure with Selenium and Continuous Integration
Graceful Failure with Selenium and Continuous IntegrationGraceful Failure with Selenium and Continuous Integration
Graceful Failure with Selenium and Continuous Integration
 
Serverless in production, an experience report (JeffConf)
Serverless in production, an experience report (JeffConf)Serverless in production, an experience report (JeffConf)
Serverless in production, an experience report (JeffConf)
 
Do it Yourself Testing
Do it Yourself TestingDo it Yourself Testing
Do it Yourself Testing
 
Testing of React JS app
Testing of React JS appTesting of React JS app
Testing of React JS app
 
Serverless in production, an experience report (linuxing in london)
Serverless in production, an experience report (linuxing in london)Serverless in production, an experience report (linuxing in london)
Serverless in production, an experience report (linuxing in london)
 

Plus de Carlos Ble

Gestión de proyectos
Gestión de proyectosGestión de proyectos
Gestión de proyectosCarlos Ble
 
Maintainable software
Maintainable softwareMaintainable software
Maintainable softwareCarlos Ble
 
Carbon offsetting
Carbon offsettingCarbon offsetting
Carbon offsettingCarlos Ble
 
Distinguir entre Problema y Solución
Distinguir entre Problema y SoluciónDistinguir entre Problema y Solución
Distinguir entre Problema y SoluciónCarlos Ble
 
ES6 Simplified
ES6 SimplifiedES6 Simplified
ES6 SimplifiedCarlos Ble
 
Behavior Driven Development - Material de clase PMA
Behavior Driven Development - Material de clase PMABehavior Driven Development - Material de clase PMA
Behavior Driven Development - Material de clase PMACarlos Ble
 
Apuntes #XPweek
Apuntes #XPweekApuntes #XPweek
Apuntes #XPweekCarlos Ble
 
Charla Tdd Uji 032010
Charla Tdd Uji 032010Charla Tdd Uji 032010
Charla Tdd Uji 032010Carlos Ble
 

Plus de Carlos Ble (8)

Gestión de proyectos
Gestión de proyectosGestión de proyectos
Gestión de proyectos
 
Maintainable software
Maintainable softwareMaintainable software
Maintainable software
 
Carbon offsetting
Carbon offsettingCarbon offsetting
Carbon offsetting
 
Distinguir entre Problema y Solución
Distinguir entre Problema y SoluciónDistinguir entre Problema y Solución
Distinguir entre Problema y Solución
 
ES6 Simplified
ES6 SimplifiedES6 Simplified
ES6 Simplified
 
Behavior Driven Development - Material de clase PMA
Behavior Driven Development - Material de clase PMABehavior Driven Development - Material de clase PMA
Behavior Driven Development - Material de clase PMA
 
Apuntes #XPweek
Apuntes #XPweekApuntes #XPweek
Apuntes #XPweek
 
Charla Tdd Uji 032010
Charla Tdd Uji 032010Charla Tdd Uji 032010
Charla Tdd Uji 032010
 

Dernier

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Dernier (20)

08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 

TDD in the Web with Python and Django

  • 1. TDD in the Web with Python XP Conference 2011 Carlos Blé www.carlosble.com @carlosble
  • 2. The Architecture Ruby on Rails, Django , Monorail, ASP.Net MVC, Spring MVC, Play Framework, Symphony, Zend Framework...
  • 3. We like to think like this
  • 4. Separate concerns Controller : Deals with the browser . Get the input, make some calls and return the output . It should be as simple as possible. The less it knows about the domain, the better. View : Renders UI. Doesn't know the domain at all!!! Domain : Deals with the user . Business requirements. Wouldn't be cool if we can exercise the domain using ”end-to-end” tests?
  • 5. Test-driving Inside-out (bottom-up) So we can test-drive the domain and invoke it from the controller after all, like this: Now we can write an integration test for this controller... but integration tests are painful!
  • 6. Is not that clean always :-(
  • 7.
  • 8. How to parse complex data (forms)
  • 9. Which UI to render for a given scenario We end up with a mess :-(
  • 10. Test-driving Outside-in (top-down) Integration tests are a scam. Let's go ” unit” We don't use Django's TestCase, but unittest's
  • 12. Replace conditional with polymorphism We can move conditionals from views to controllers
  • 13. Replace conditional with polymorphism Django templates inheritance is so cool!!!
  • 14.
  • 15. Selenium (or Webdriver) tests are too fragile
  • 16. Test-driving controllers give us fast feedback
  • 17.
  • 18. Unit test the domain (test-first)
  • 19. Write integration tests for DB access, etc
  • 20. Write end-to-end tests for the domain We don't use Django's TestCase, but unittest's