SlideShare a Scribd company logo
dylan@pretaweb.comPloneConf 2009 Dylan Jay
TestBrowser Driven Development
How to get bulletproof code from lazy developers
Dylan Jay
djay@pretaweb.com
dylan@pretaweb.comPloneConf 2009 Dylan Jay
• Dylan Jay
• 6 years with Plone
• Large corporate Java/Rational Unified process
background
• Co-founder of PretaWeb in Australia
• Started pretaweb.funnelweb, collective.hostout,
Products.LoginLockout
(and way way back RemoteUserFolder)
About me
dylan@pretaweb.comPloneConf 2009 Dylan Jay
What this talk is about
• Story of how we delivered the difficult (previous
failures)
• Communication
• Users ↔ Business Analyst
• Business Analyst ↔ Developers
• For project managers, business analysts,
technical leads
• But also for solo development
dylan@pretaweb.comPloneConf 2009 Dylan Jay
The story begins...
• Gov. department
• Complex Workflow Application of sensitive info
– generating certificates
• BA 40% Dev 60% + support
• Fixed price + fixed deadline.
• Sold them on scrum … without mentioning
scrum
• Used hybrid SCUM + usecase analysis
dylan@pretaweb.comPloneConf 2009 Dylan Jay
Roles: reference
• BA: Business Analyst - Extract requirements
from client and produce requirements
document. Traditionally job ends before code
begins
• PO: Product Owner - In SCRUM: Sort of like a
BA who sticks around. Go to person.
• Dev: Developer - People who want solve code
problems not user problems :)
• ST/QA: System Tester - Non-developers there
to break developers work
dylan@pretaweb.comPloneConf 2009 Dylan Jay
CRC Card sessions
• Class, Responsibility, Collaboration
dylan@pretaweb.comPloneConf 2009 Dylan Jay
Use-case analysis
Great for workflow/edge cases
• Usecase:
– 1 main scenario (sunny day)
– ~30 alternate scenarions (rainy day)
• Challenge - level of detail
– Premature detail vs. not enough
• ~50 scenarios
• 43 page word doc including non-functional
requirements
dylan@pretaweb.comPloneConf 2009 Dylan Jay
Paper Based Prototype
• http://www.balsamiq.com/products/mockups
dylan@pretaweb.comPloneConf 2009 Dylan Jay
Stories vs Usecases
• We used SCRUM
• SCRUM uses Stories
• Stories are good for estimation
• Stories group functionality vs. Scenarios runs
across functionality
• We
– Broke large scenario into three stories
– Grouped 3-4 related scenarios into stories
dylan@pretaweb.comPloneConf 2009 Dylan Jay
Unit Testing
1 Code
2 Write test
3 Run test: it succeeds
4 Refactor
5 Run test: it succeeds
• Tests are code
• Test functions/API
• Tests run fast
• Tests run often
• Tests run after every
change
dylan@pretaweb.comPloneConf 2009 Dylan Jay
Unit Testing – scorecard
• Communication of requirements - x
• Validation of requirements – x
• Prevent regressions - ✓
dylan@pretaweb.comPloneConf 2009 Dylan Jay
Doctests
• Structured text document
• Tells a story
• Tells a story with EXAMPLES THAT WORK!
• Code interleaved
• Output checked against actual == test
• docstring or standalone doctests
dylan@pretaweb.comPloneConf 2009 Dylan Jay
Functional Testing
• Test system from outside – GUI after
development
• Written from user perspective
• Easy to write – write it as you would use it
• Usecase = test
• Often done by separate team – system testers
• Often done just before delivery
• Example: selenium
dylan@pretaweb.comPloneConf 2009 Dylan Jay
Selenium
dylan@pretaweb.comPloneConf 2009 Dylan Jay
zc.testbrowser an api browser
Easy to keep in your head – fun - natural
browser.getControl(label=None, name=None, index=None)
/.options /.value /.click()
browser.getLink(text=None, url=None, id=None)
/.click()
browser.open(url)
brower.goBack()
browser.reload()
print browser.contents
dylan@pretaweb.comPloneConf 2009 Dylan Jay
Usecases to tests
• Dev: Branch created
• Dev: Scenarios copied to StoryX.txt
• Dev: Code developed
• Dev: StoryX.txt augmented with testbrowser
• Dev: All Tests pass
• PO: Code + test reviewed
• PO: Branch merged
dylan@pretaweb.comPloneConf 2009 Dylan Jay
TestBrowser extras
• Doesn't do javascript
• But zc.testbrowser.real does
– Requires firefox
• Zope.testrecorder
– Generate tests from GUI
• With Plone use roadrunner
dylan@pretaweb.comPloneConf 2009 Dylan Jay
Still not working...
• Implemented wrong thing – rework
• Usecases not detailed enough
• Lazy BA – didn't want tell developers how to do
it
• Lazy developers – didn't want at the user level
dylan@pretaweb.comPloneConf 2009 Dylan Jay
Functional Test Driven Development
• PO: Branch created
• PO: Scenarios copied to StoryX.txt
• PO: StoryX.txt augmented with tests (sort of)
• Dev: Code developed
• Dev: Test finished off
• Dev: All tests pass
• PO: Code + test reviewed
• PO: Branch merged
dylan@pretaweb.comPloneConf 2009 Dylan Jay
Our process – Bugs
• Dev: Branch created
• Dev: StoryX.txt add in bug condition
• Dev: Show test fails
• Dev: Code fixed
• Dev: All tests pass
• PO: Code + test reviewed
• PO: Branch merged
dylan@pretaweb.comPloneConf 2009 Dylan Jay
Test Driven Development
1 Write test
2 Run test: it fails
3 Fix code
4 Run test: it succeeds
5 Refactor
6 Run test: it succeeds
7 Repeat
• Write tests before
code
• red/green/refactor
– First fail then fix
• Forces you to
understand
requirements before
writing code
dylan@pretaweb.comPloneConf 2009 Dylan Jay
TestBrowser Driven Development
• Communication of requirements - ✓
– Level of detail right
• Easy – ✓
– Technical PO can do it in reasonable time
• Validation of requirements – ✓
– Easy to see changes to tests
• Prevent regressions - ✓
– Test suite run after any change e.g. 1862 bug
dylan@pretaweb.comPloneConf 2009 Dylan Jay
Example: URL Shortener
dylan@pretaweb.comPloneConf 2009 Dylan Jay
Proposal: Screenshot gen
• Testbrowser statements → screenshot
• Highlight action or comparison in screenshot
• Doctests with pictures and no code
• A better pypi & Plone Software Center
• Documentation Driven Development
dylan@pretaweb.comPloneConf 2009 Dylan Jay
Conclusion
• ~50 usecases
– all turned into doctests and extended
– Living requirements/documention
• Quality was very important
– delivered with peace of mind
• Tight deadline, tight budget
– delivered on time on budget
• Lazy developers
– less rework, less delays = $$$
dylan@pretaweb.comPloneConf 2009 Dylan Jay
Credits
http://docs.python.org/library/doctest.html
http://pypi.python.org/pypi/zc.testbrowser
http://plone.org/documentation/tutorial/testing/functional-tests

More Related Content

What's hot

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
 
End-to-end performance testing, profiling, and analysis at Redis
End-to-end performance testing, profiling, and analysis at RedisEnd-to-end performance testing, profiling, and analysis at Redis
End-to-end performance testing, profiling, and analysis at Redis
Filipe Oliveira
 
Presentation delex
Presentation delexPresentation delex
Presentation delex
Alexander Pushkarev
 
Approval Tests in Action: A LEGO Exercise and an Experience Report
Approval Tests in Action: A LEGO Exercise and an Experience ReportApproval Tests in Action: A LEGO Exercise and an Experience Report
Approval Tests in Action: A LEGO Exercise and an Experience Report
houseofyin
 
Introduction to test_driven_development
Introduction to test_driven_developmentIntroduction to test_driven_development
Introduction to test_driven_development
haochenglee
 
Security Implications for a DevOps Transformation
Security Implications for a DevOps TransformationSecurity Implications for a DevOps Transformation
Security Implications for a DevOps Transformation
DevOps.com
 
Apex triggers i
Apex triggers iApex triggers i
Apex triggers i
Obidjon Komiljonov
 
Continuous delivery from the trenches
Continuous delivery from the trenchesContinuous delivery from the trenches
Continuous delivery from the trenches
Michael Medin
 
АНТОН МУЖАЙЛО «Test Team Development and Management Techniques»
АНТОН МУЖАЙЛО «Test Team Development and Management Techniques»АНТОН МУЖАЙЛО «Test Team Development and Management Techniques»
АНТОН МУЖАЙЛО «Test Team Development and Management Techniques»
QADay
 
Story Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium FrameworkStory Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium Framework
Oleksiy Rezchykov
 
Benefits from AATs
Benefits from AATsBenefits from AATs
Benefits from AATs
Wyn B. Van Devanter
 
deliver:agile - Enable your Agile Team with Continuous Delivery Pipelines
deliver:agile - Enable your Agile Team with Continuous Delivery Pipelinesdeliver:agile - Enable your Agile Team with Continuous Delivery Pipelines
deliver:agile - Enable your Agile Team with Continuous Delivery Pipelines
Esteban Garcia
 
How to write better tests with Test Driven Development
How to write better tests with Test Driven DevelopmentHow to write better tests with Test Driven Development
How to write better tests with Test Driven Development
Alex Hoffman
 
Why your company loves to welcome change but sucks at accommodating it
Why your company loves to welcome change but sucks at accommodating itWhy your company loves to welcome change but sucks at accommodating it
Why your company loves to welcome change but sucks at accommodating it
Farooq Ali
 
Inside Behavior Driven Development
Inside Behavior Driven DevelopmentInside Behavior Driven Development
Inside Behavior Driven Development
Camille Bell
 
#ESPC18 How to do #devops with the #SharePoint Framework and why it matters?
#ESPC18 How to do #devops with the #SharePoint Framework and why it matters?#ESPC18 How to do #devops with the #SharePoint Framework and why it matters?
#ESPC18 How to do #devops with the #SharePoint Framework and why it matters?
Vincent Biret
 
Get Testing with tSQLt - SQL In The City Workshop 2014
Get Testing with tSQLt - SQL In The City Workshop 2014Get Testing with tSQLt - SQL In The City Workshop 2014
Get Testing with tSQLt - SQL In The City Workshop 2014
Red Gate Software
 
Test Driven Development and Automation
Test Driven Development and AutomationTest Driven Development and Automation
Test Driven Development and Automation
Mahesh Salaria
 
Test Driven Development - a Practitioner’s Perspective
Test Driven Development - a Practitioner’s PerspectiveTest Driven Development - a Practitioner’s Perspective
Test Driven Development - a Practitioner’s Perspective
Malinda Kapuruge
 
Enterprise Workflows When You Aren't Enterprise
Enterprise Workflows When You Aren't EnterpriseEnterprise Workflows When You Aren't Enterprise
Enterprise Workflows When You Aren't Enterprise
Chris Tankersley
 

What's hot (20)

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)
 
End-to-end performance testing, profiling, and analysis at Redis
End-to-end performance testing, profiling, and analysis at RedisEnd-to-end performance testing, profiling, and analysis at Redis
End-to-end performance testing, profiling, and analysis at Redis
 
Presentation delex
Presentation delexPresentation delex
Presentation delex
 
Approval Tests in Action: A LEGO Exercise and an Experience Report
Approval Tests in Action: A LEGO Exercise and an Experience ReportApproval Tests in Action: A LEGO Exercise and an Experience Report
Approval Tests in Action: A LEGO Exercise and an Experience Report
 
Introduction to test_driven_development
Introduction to test_driven_developmentIntroduction to test_driven_development
Introduction to test_driven_development
 
Security Implications for a DevOps Transformation
Security Implications for a DevOps TransformationSecurity Implications for a DevOps Transformation
Security Implications for a DevOps Transformation
 
Apex triggers i
Apex triggers iApex triggers i
Apex triggers i
 
Continuous delivery from the trenches
Continuous delivery from the trenchesContinuous delivery from the trenches
Continuous delivery from the trenches
 
АНТОН МУЖАЙЛО «Test Team Development and Management Techniques»
АНТОН МУЖАЙЛО «Test Team Development and Management Techniques»АНТОН МУЖАЙЛО «Test Team Development and Management Techniques»
АНТОН МУЖАЙЛО «Test Team Development and Management Techniques»
 
Story Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium FrameworkStory Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium Framework
 
Benefits from AATs
Benefits from AATsBenefits from AATs
Benefits from AATs
 
deliver:agile - Enable your Agile Team with Continuous Delivery Pipelines
deliver:agile - Enable your Agile Team with Continuous Delivery Pipelinesdeliver:agile - Enable your Agile Team with Continuous Delivery Pipelines
deliver:agile - Enable your Agile Team with Continuous Delivery Pipelines
 
How to write better tests with Test Driven Development
How to write better tests with Test Driven DevelopmentHow to write better tests with Test Driven Development
How to write better tests with Test Driven Development
 
Why your company loves to welcome change but sucks at accommodating it
Why your company loves to welcome change but sucks at accommodating itWhy your company loves to welcome change but sucks at accommodating it
Why your company loves to welcome change but sucks at accommodating it
 
Inside Behavior Driven Development
Inside Behavior Driven DevelopmentInside Behavior Driven Development
Inside Behavior Driven Development
 
#ESPC18 How to do #devops with the #SharePoint Framework and why it matters?
#ESPC18 How to do #devops with the #SharePoint Framework and why it matters?#ESPC18 How to do #devops with the #SharePoint Framework and why it matters?
#ESPC18 How to do #devops with the #SharePoint Framework and why it matters?
 
Get Testing with tSQLt - SQL In The City Workshop 2014
Get Testing with tSQLt - SQL In The City Workshop 2014Get Testing with tSQLt - SQL In The City Workshop 2014
Get Testing with tSQLt - SQL In The City Workshop 2014
 
Test Driven Development and Automation
Test Driven Development and AutomationTest Driven Development and Automation
Test Driven Development and Automation
 
Test Driven Development - a Practitioner’s Perspective
Test Driven Development - a Practitioner’s PerspectiveTest Driven Development - a Practitioner’s Perspective
Test Driven Development - a Practitioner’s Perspective
 
Enterprise Workflows When You Aren't Enterprise
Enterprise Workflows When You Aren't EnterpriseEnterprise Workflows When You Aren't Enterprise
Enterprise Workflows When You Aren't Enterprise
 

Viewers also liked

Teacher workshop 8 24 2012
Teacher workshop 8 24 2012Teacher workshop 8 24 2012
Teacher workshop 8 24 2012Gina Christoffel
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
dcsunu
 
Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven Development
Effective
 
Agile Software Development Process
Agile Software Development ProcessAgile Software Development Process
Agile Software Development Process
ScioSales
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
Valerio Maggio
 
Software Development Outsourcing - Total Cost Of Engagement Tce
Software Development Outsourcing - Total Cost Of Engagement TceSoftware Development Outsourcing - Total Cost Of Engagement Tce
Software Development Outsourcing - Total Cost Of Engagement Tce
ScioSales
 

Viewers also liked (7)

Cool garden signs
Cool garden signsCool garden signs
Cool garden signs
 
Teacher workshop 8 24 2012
Teacher workshop 8 24 2012Teacher workshop 8 24 2012
Teacher workshop 8 24 2012
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Test-Driven Development
Test-Driven DevelopmentTest-Driven Development
Test-Driven Development
 
Agile Software Development Process
Agile Software Development ProcessAgile Software Development Process
Agile Software Development Process
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Software Development Outsourcing - Total Cost Of Engagement Tce
Software Development Outsourcing - Total Cost Of Engagement TceSoftware Development Outsourcing - Total Cost Of Engagement Tce
Software Development Outsourcing - Total Cost Of Engagement Tce
 

Similar to TestBrowser Driven Development: How to get bulletproof code from lazy developers

Developers Testing - Girl Code at bloomon
Developers Testing - Girl Code at bloomonDevelopers Testing - Girl Code at bloomon
Developers Testing - Girl Code at bloomon
Ineke Scheffers
 
Start with passing tests (tdd for bugs) v0.5 (22 sep 2016)
Start with passing tests (tdd for bugs) v0.5 (22 sep 2016)Start with passing tests (tdd for bugs) v0.5 (22 sep 2016)
Start with passing tests (tdd for bugs) v0.5 (22 sep 2016)
Dinis Cruz
 
Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...
Niels Frydenholm
 
Making security-agile matt-tesauro
Making security-agile matt-tesauroMaking security-agile matt-tesauro
Making security-agile matt-tesauro
Matt Tesauro
 
Automated testing in javascript
Automated testing in javascriptAutomated testing in javascript
Automated testing in javascript
Michael Yagudaev
 
Continuous Testing
Continuous TestingContinuous Testing
Continuous Testing
Karim Fanadka
 
Continuous Testing 2016
Continuous Testing 2016Continuous Testing 2016
Continuous Testing 2016
Karim Fanadka
 
Dev ops ci-ap-is-oh-my_security-gone-agile_ut-austin
Dev ops ci-ap-is-oh-my_security-gone-agile_ut-austinDev ops ci-ap-is-oh-my_security-gone-agile_ut-austin
Dev ops ci-ap-is-oh-my_security-gone-agile_ut-austin
Matt Tesauro
 
What is DevOps
What is DevOpsWhat is DevOps
What is DevOps
Kyle Hailey
 
What is this agile thing anyway
What is this agile thing anywayWhat is this agile thing anyway
What is this agile thing anyway
Lisa Van Gelder
 
Building a custom cms with django
Building a custom cms with djangoBuilding a custom cms with django
Building a custom cms with django
Yann Malet
 
14 Habits of Great SQL Developers
14 Habits of Great SQL Developers14 Habits of Great SQL Developers
14 Habits of Great SQL Developers
Ike Ellis
 
Road to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.comRoad to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.com
Aviran Mordo
 
From inheritance to maintenance: restructuring your projects – Unite Copenhag...
From inheritance to maintenance: restructuring your projects – Unite Copenhag...From inheritance to maintenance: restructuring your projects – Unite Copenhag...
From inheritance to maintenance: restructuring your projects – Unite Copenhag...
Unity Technologies
 
JIRA Performance Testing in Pictures - Edward Bukoski Michael March
JIRA Performance Testing in Pictures - Edward Bukoski Michael MarchJIRA Performance Testing in Pictures - Edward Bukoski Michael March
JIRA Performance Testing in Pictures - Edward Bukoski Michael MarchAtlassian
 
Django production
Django productionDjango production
Django production
pythonsd
 
Continuous Integration as a Development Team’s Way of Life
Continuous Integration as a Development Team’s Way of LifeContinuous Integration as a Development Team’s Way of Life
Continuous Integration as a Development Team’s Way of Life
TechWell
 
Lean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill AyersLean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill Ayers
SPC Adriatics
 
Continuous delivery @wcap 5-09-2013
Continuous delivery   @wcap 5-09-2013Continuous delivery   @wcap 5-09-2013
Continuous delivery @wcap 5-09-2013
David Funaro
 
BrainQuest-DevOps
BrainQuest-DevOpsBrainQuest-DevOps
BrainQuest-DevOps
Eric Phan
 

Similar to TestBrowser Driven Development: How to get bulletproof code from lazy developers (20)

Developers Testing - Girl Code at bloomon
Developers Testing - Girl Code at bloomonDevelopers Testing - Girl Code at bloomon
Developers Testing - Girl Code at bloomon
 
Start with passing tests (tdd for bugs) v0.5 (22 sep 2016)
Start with passing tests (tdd for bugs) v0.5 (22 sep 2016)Start with passing tests (tdd for bugs) v0.5 (22 sep 2016)
Start with passing tests (tdd for bugs) v0.5 (22 sep 2016)
 
Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...Getting your mobile test automation process in place - using Cucumber and Cal...
Getting your mobile test automation process in place - using Cucumber and Cal...
 
Making security-agile matt-tesauro
Making security-agile matt-tesauroMaking security-agile matt-tesauro
Making security-agile matt-tesauro
 
Automated testing in javascript
Automated testing in javascriptAutomated testing in javascript
Automated testing in javascript
 
Continuous Testing
Continuous TestingContinuous Testing
Continuous Testing
 
Continuous Testing 2016
Continuous Testing 2016Continuous Testing 2016
Continuous Testing 2016
 
Dev ops ci-ap-is-oh-my_security-gone-agile_ut-austin
Dev ops ci-ap-is-oh-my_security-gone-agile_ut-austinDev ops ci-ap-is-oh-my_security-gone-agile_ut-austin
Dev ops ci-ap-is-oh-my_security-gone-agile_ut-austin
 
What is DevOps
What is DevOpsWhat is DevOps
What is DevOps
 
What is this agile thing anyway
What is this agile thing anywayWhat is this agile thing anyway
What is this agile thing anyway
 
Building a custom cms with django
Building a custom cms with djangoBuilding a custom cms with django
Building a custom cms with django
 
14 Habits of Great SQL Developers
14 Habits of Great SQL Developers14 Habits of Great SQL Developers
14 Habits of Great SQL Developers
 
Road to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.comRoad to Continuous Delivery - Wix.com
Road to Continuous Delivery - Wix.com
 
From inheritance to maintenance: restructuring your projects – Unite Copenhag...
From inheritance to maintenance: restructuring your projects – Unite Copenhag...From inheritance to maintenance: restructuring your projects – Unite Copenhag...
From inheritance to maintenance: restructuring your projects – Unite Copenhag...
 
JIRA Performance Testing in Pictures - Edward Bukoski Michael March
JIRA Performance Testing in Pictures - Edward Bukoski Michael MarchJIRA Performance Testing in Pictures - Edward Bukoski Michael March
JIRA Performance Testing in Pictures - Edward Bukoski Michael March
 
Django production
Django productionDjango production
Django production
 
Continuous Integration as a Development Team’s Way of Life
Continuous Integration as a Development Team’s Way of LifeContinuous Integration as a Development Team’s Way of Life
Continuous Integration as a Development Team’s Way of Life
 
Lean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill AyersLean-Agile Development with SharePoint - Bill Ayers
Lean-Agile Development with SharePoint - Bill Ayers
 
Continuous delivery @wcap 5-09-2013
Continuous delivery   @wcap 5-09-2013Continuous delivery   @wcap 5-09-2013
Continuous delivery @wcap 5-09-2013
 
BrainQuest-DevOps
BrainQuest-DevOpsBrainQuest-DevOps
BrainQuest-DevOps
 

More from Dylan Jay

5 things STILL! TOO! HARD! in Plone 5
5 things STILL! TOO! HARD! in Plone 55 things STILL! TOO! HARD! in Plone 5
5 things STILL! TOO! HARD! in Plone 5
Dylan Jay
 
The eggless Plone manifesto (or Plone the open source cms-as-a-service platf...
The eggless Plone manifesto (or Plone  the open source cms-as-a-service platf...The eggless Plone manifesto (or Plone  the open source cms-as-a-service platf...
The eggless Plone manifesto (or Plone the open source cms-as-a-service platf...
Dylan Jay
 
The goodies of zope, pyramid, and plone (2)
The goodies of zope, pyramid, and plone (2)The goodies of zope, pyramid, and plone (2)
The goodies of zope, pyramid, and plone (2)
Dylan Jay
 
Surviving an earthquake's worth of traffic
Surviving an earthquake's worth of trafficSurviving an earthquake's worth of traffic
Surviving an earthquake's worth of trafficDylan Jay
 
TTW FTW: Plone as the new wordpress
TTW FTW: Plone as the new wordpressTTW FTW: Plone as the new wordpress
TTW FTW: Plone as the new wordpress
Dylan Jay
 
Plone pwns
Plone pwnsPlone pwns
Plone pwns
Dylan Jay
 
Buildout: How to maintain big app stacks without losing your mind
Buildout: How to maintain big app stacks without losing your mindBuildout: How to maintain big app stacks without losing your mind
Buildout: How to maintain big app stacks without losing your mind
Dylan Jay
 
Pyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web appsPyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web apps
Dylan Jay
 
Plone: The CMS that hits above it's weight
Plone: The CMS that hits above it's weightPlone: The CMS that hits above it's weight
Plone: The CMS that hits above it's weight
Dylan Jay
 
Opps I deployed it again-ploneconf2010
Opps I deployed it again-ploneconf2010Opps I deployed it again-ploneconf2010
Opps I deployed it again-ploneconf2010
Dylan Jay
 
Funnelweb ploneconf2010
Funnelweb ploneconf2010Funnelweb ploneconf2010
Funnelweb ploneconf2010
Dylan Jay
 
Opps i deployed it again
Opps i deployed it againOpps i deployed it again
Opps i deployed it again
Dylan Jay
 
Plone for python programmers
Plone for python programmersPlone for python programmers
Plone for python programmers
Dylan Jay
 
How to host an app for $20 in 20min using buildout and hostout
How to host an app  for $20 in 20min using buildout and hostoutHow to host an app  for $20 in 20min using buildout and hostout
How to host an app for $20 in 20min using buildout and hostout
Dylan Jay
 

More from Dylan Jay (14)

5 things STILL! TOO! HARD! in Plone 5
5 things STILL! TOO! HARD! in Plone 55 things STILL! TOO! HARD! in Plone 5
5 things STILL! TOO! HARD! in Plone 5
 
The eggless Plone manifesto (or Plone the open source cms-as-a-service platf...
The eggless Plone manifesto (or Plone  the open source cms-as-a-service platf...The eggless Plone manifesto (or Plone  the open source cms-as-a-service platf...
The eggless Plone manifesto (or Plone the open source cms-as-a-service platf...
 
The goodies of zope, pyramid, and plone (2)
The goodies of zope, pyramid, and plone (2)The goodies of zope, pyramid, and plone (2)
The goodies of zope, pyramid, and plone (2)
 
Surviving an earthquake's worth of traffic
Surviving an earthquake's worth of trafficSurviving an earthquake's worth of traffic
Surviving an earthquake's worth of traffic
 
TTW FTW: Plone as the new wordpress
TTW FTW: Plone as the new wordpressTTW FTW: Plone as the new wordpress
TTW FTW: Plone as the new wordpress
 
Plone pwns
Plone pwnsPlone pwns
Plone pwns
 
Buildout: How to maintain big app stacks without losing your mind
Buildout: How to maintain big app stacks without losing your mindBuildout: How to maintain big app stacks without losing your mind
Buildout: How to maintain big app stacks without losing your mind
 
Pyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web appsPyramid Lighter/Faster/Better web apps
Pyramid Lighter/Faster/Better web apps
 
Plone: The CMS that hits above it's weight
Plone: The CMS that hits above it's weightPlone: The CMS that hits above it's weight
Plone: The CMS that hits above it's weight
 
Opps I deployed it again-ploneconf2010
Opps I deployed it again-ploneconf2010Opps I deployed it again-ploneconf2010
Opps I deployed it again-ploneconf2010
 
Funnelweb ploneconf2010
Funnelweb ploneconf2010Funnelweb ploneconf2010
Funnelweb ploneconf2010
 
Opps i deployed it again
Opps i deployed it againOpps i deployed it again
Opps i deployed it again
 
Plone for python programmers
Plone for python programmersPlone for python programmers
Plone for python programmers
 
How to host an app for $20 in 20min using buildout and hostout
How to host an app  for $20 in 20min using buildout and hostoutHow to host an app  for $20 in 20min using buildout and hostout
How to host an app for $20 in 20min using buildout and hostout
 

Recently uploaded

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
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
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
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
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
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
UiPathCommunity
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 

Recently uploaded (20)

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...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
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
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
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 !
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 

TestBrowser Driven Development: How to get bulletproof code from lazy developers

  • 1. dylan@pretaweb.comPloneConf 2009 Dylan Jay TestBrowser Driven Development How to get bulletproof code from lazy developers Dylan Jay djay@pretaweb.com
  • 2. dylan@pretaweb.comPloneConf 2009 Dylan Jay • Dylan Jay • 6 years with Plone • Large corporate Java/Rational Unified process background • Co-founder of PretaWeb in Australia • Started pretaweb.funnelweb, collective.hostout, Products.LoginLockout (and way way back RemoteUserFolder) About me
  • 3. dylan@pretaweb.comPloneConf 2009 Dylan Jay What this talk is about • Story of how we delivered the difficult (previous failures) • Communication • Users ↔ Business Analyst • Business Analyst ↔ Developers • For project managers, business analysts, technical leads • But also for solo development
  • 4. dylan@pretaweb.comPloneConf 2009 Dylan Jay The story begins... • Gov. department • Complex Workflow Application of sensitive info – generating certificates • BA 40% Dev 60% + support • Fixed price + fixed deadline. • Sold them on scrum … without mentioning scrum • Used hybrid SCUM + usecase analysis
  • 5. dylan@pretaweb.comPloneConf 2009 Dylan Jay Roles: reference • BA: Business Analyst - Extract requirements from client and produce requirements document. Traditionally job ends before code begins • PO: Product Owner - In SCRUM: Sort of like a BA who sticks around. Go to person. • Dev: Developer - People who want solve code problems not user problems :) • ST/QA: System Tester - Non-developers there to break developers work
  • 6. dylan@pretaweb.comPloneConf 2009 Dylan Jay CRC Card sessions • Class, Responsibility, Collaboration
  • 7. dylan@pretaweb.comPloneConf 2009 Dylan Jay Use-case analysis Great for workflow/edge cases • Usecase: – 1 main scenario (sunny day) – ~30 alternate scenarions (rainy day) • Challenge - level of detail – Premature detail vs. not enough • ~50 scenarios • 43 page word doc including non-functional requirements
  • 8. dylan@pretaweb.comPloneConf 2009 Dylan Jay Paper Based Prototype • http://www.balsamiq.com/products/mockups
  • 9. dylan@pretaweb.comPloneConf 2009 Dylan Jay Stories vs Usecases • We used SCRUM • SCRUM uses Stories • Stories are good for estimation • Stories group functionality vs. Scenarios runs across functionality • We – Broke large scenario into three stories – Grouped 3-4 related scenarios into stories
  • 10. dylan@pretaweb.comPloneConf 2009 Dylan Jay Unit Testing 1 Code 2 Write test 3 Run test: it succeeds 4 Refactor 5 Run test: it succeeds • Tests are code • Test functions/API • Tests run fast • Tests run often • Tests run after every change
  • 11. dylan@pretaweb.comPloneConf 2009 Dylan Jay Unit Testing – scorecard • Communication of requirements - x • Validation of requirements – x • Prevent regressions - ✓
  • 12. dylan@pretaweb.comPloneConf 2009 Dylan Jay Doctests • Structured text document • Tells a story • Tells a story with EXAMPLES THAT WORK! • Code interleaved • Output checked against actual == test • docstring or standalone doctests
  • 13. dylan@pretaweb.comPloneConf 2009 Dylan Jay Functional Testing • Test system from outside – GUI after development • Written from user perspective • Easy to write – write it as you would use it • Usecase = test • Often done by separate team – system testers • Often done just before delivery • Example: selenium
  • 15. dylan@pretaweb.comPloneConf 2009 Dylan Jay zc.testbrowser an api browser Easy to keep in your head – fun - natural browser.getControl(label=None, name=None, index=None) /.options /.value /.click() browser.getLink(text=None, url=None, id=None) /.click() browser.open(url) brower.goBack() browser.reload() print browser.contents
  • 16. dylan@pretaweb.comPloneConf 2009 Dylan Jay Usecases to tests • Dev: Branch created • Dev: Scenarios copied to StoryX.txt • Dev: Code developed • Dev: StoryX.txt augmented with testbrowser • Dev: All Tests pass • PO: Code + test reviewed • PO: Branch merged
  • 17. dylan@pretaweb.comPloneConf 2009 Dylan Jay TestBrowser extras • Doesn't do javascript • But zc.testbrowser.real does – Requires firefox • Zope.testrecorder – Generate tests from GUI • With Plone use roadrunner
  • 18. dylan@pretaweb.comPloneConf 2009 Dylan Jay Still not working... • Implemented wrong thing – rework • Usecases not detailed enough • Lazy BA – didn't want tell developers how to do it • Lazy developers – didn't want at the user level
  • 19. dylan@pretaweb.comPloneConf 2009 Dylan Jay Functional Test Driven Development • PO: Branch created • PO: Scenarios copied to StoryX.txt • PO: StoryX.txt augmented with tests (sort of) • Dev: Code developed • Dev: Test finished off • Dev: All tests pass • PO: Code + test reviewed • PO: Branch merged
  • 20. dylan@pretaweb.comPloneConf 2009 Dylan Jay Our process – Bugs • Dev: Branch created • Dev: StoryX.txt add in bug condition • Dev: Show test fails • Dev: Code fixed • Dev: All tests pass • PO: Code + test reviewed • PO: Branch merged
  • 21. dylan@pretaweb.comPloneConf 2009 Dylan Jay Test Driven Development 1 Write test 2 Run test: it fails 3 Fix code 4 Run test: it succeeds 5 Refactor 6 Run test: it succeeds 7 Repeat • Write tests before code • red/green/refactor – First fail then fix • Forces you to understand requirements before writing code
  • 22. dylan@pretaweb.comPloneConf 2009 Dylan Jay TestBrowser Driven Development • Communication of requirements - ✓ – Level of detail right • Easy – ✓ – Technical PO can do it in reasonable time • Validation of requirements – ✓ – Easy to see changes to tests • Prevent regressions - ✓ – Test suite run after any change e.g. 1862 bug
  • 23. dylan@pretaweb.comPloneConf 2009 Dylan Jay Example: URL Shortener
  • 24. dylan@pretaweb.comPloneConf 2009 Dylan Jay Proposal: Screenshot gen • Testbrowser statements → screenshot • Highlight action or comparison in screenshot • Doctests with pictures and no code • A better pypi & Plone Software Center • Documentation Driven Development
  • 25. dylan@pretaweb.comPloneConf 2009 Dylan Jay Conclusion • ~50 usecases – all turned into doctests and extended – Living requirements/documention • Quality was very important – delivered with peace of mind • Tight deadline, tight budget – delivered on time on budget • Lazy developers – less rework, less delays = $$$
  • 26. dylan@pretaweb.comPloneConf 2009 Dylan Jay Credits http://docs.python.org/library/doctest.html http://pypi.python.org/pypi/zc.testbrowser http://plone.org/documentation/tutorial/testing/functional-tests