SlideShare una empresa de Scribd logo
1 de 24
Developer Testing
Code Quality and You
If it builds, ship it
• Was young and foolish
• Talk to a BA? QA? Never!
• Just focused on writing code – not on quality
code
• Bugs and bugs, oh my!
In all fairness
• Was young and naïve
• “It worked on my machine”
• Still a start-up with a start-up mentality where
the “Wild west” was accepted
• But still there had to be a better way…
Ta-da!
Unit Tests
• Focuses on the smallest
testable part of an
application
• Independent
Unit Testing
• Cheap!
• Finds problems early
• Facilitates changes
• Promotes decoupling
• Living Documentation
Example Unit Test
Integration Tests
• Verifies functional, performance, and
reliability
– Do all the individual “units” work together?
– Do all the combined “units” work in a performant
manner?
– Do all the “units” work with external resources
and/or dependencies?
Integration Test Example
Acceptance Tests
• Higher-level tests that verify completeness of
a user story
• Written in Gherkin:
Given that I’m Product Owner,
When the sprint ends,
Then all of the stories should meet my requirements
• Highly collaborative between customers,
Product Owners, BAs, QAs and Devs
Acceptance Tests
• A user story is not considered complete until
the acceptance tests have passed
Acceptance Test Example
UI & Manual Tests
• Harder to automate
• Still need to do exploratory testing
But what about…
• Regression Testing?
– Rerun all of the tests we created previously
• Smoke Testing?
– Rerun a subset of the tests we created previously
• Performance Testing?
– Rerun a focused subset of the tests we created
previously with concurrency and load against a
benchmark
Composition of the Tests
• Happy Paths
• Sad Paths
• “Woah, wasn’t expecting that” Paths
Testing Anti-Patterns
• But aren’t code reviews a substitute?
• But we are near the end of Project XYZ; why
should we add tests now?
• But couldn’t we “break” the code by adding
tests?
• But it will take a longer time to complete
• But our code-base is too large/complex to add
tests
Test Driven Development (TDD)
• Write a Test that fails
• Write some code
• Make all Tests pass
• Refactor
• Rinse and Repeat
Behaviour Driven Development (BDD)
• Write a Test* that fails
• Write some code
• Make all Tests pass
• Refactor
• Rinse and Repeat
*With a different purpose in mind; acceptance
TDD v BDD
• If I am doing BDD then do I need to do TDD or
vice versa?
– Absolutely!
– TDD makes sure you are writing the thing right;
BDD makes sure you are writing the right thing
What about Code Reviews?
• Absolutely!
• But the first question needs to be “show me
the passing tests”
• Make sure we are getting better at writing
tests
The Who
• Quality is everyone’s responsibility
– Devs
– QAs
– BAs
– UX
– Product Owners
The When
• During each sprint:
– BA, Dev & QA all collaborating and following each
story to completion
• Today!
Developer Testing
• “How do I sell my executive team on doing this
stuff? Don't. Just do it. They don't know what
you're doing anyway” —Jim Highsmith
Developer Testing

Más contenido relacionado

La actualidad más candente

Agile Testing in Enterprise: Way to transform - SQA Days 2014
Agile Testing in Enterprise: Way to transform - SQA Days 2014Agile Testing in Enterprise: Way to transform - SQA Days 2014
Agile Testing in Enterprise: Way to transform - SQA Days 2014Andrey Rebrov
 
How technical excellence helps in LeSS adoption
How technical excellence helps in LeSS adoptionHow technical excellence helps in LeSS adoption
How technical excellence helps in LeSS adoptionAnton Bevzuk
 
How testers add value to the organization appium conf
How testers add value to the organization  appium confHow testers add value to the organization  appium conf
How testers add value to the organization appium confCorina Pip
 
How engineering practices help business
How engineering practices help businessHow engineering practices help business
How engineering practices help businessAndrey Rebrov
 
Definition Of Done
Definition Of DoneDefinition Of Done
Definition Of DoneWei Zhu
 
ALE15 The real value of a definition of done
ALE15  The real value of a definition of doneALE15  The real value of a definition of done
ALE15 The real value of a definition of doneChristian Vos
 
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanBehavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanQA or the Highway
 
Behavior-Driven Design: One Team's Exploration
Behavior-Driven Design: One Team's ExplorationBehavior-Driven Design: One Team's Exploration
Behavior-Driven Design: One Team's Explorationdtcoutu
 
Trends in Agile Testing by Lisa Crispin
Trends in Agile Testing by Lisa CrispinTrends in Agile Testing by Lisa Crispin
Trends in Agile Testing by Lisa CrispinDirecti Group
 
Definition of done training
Definition of done trainingDefinition of done training
Definition of done trainingMonica Yap
 
Test Automation Canvas
Test Automation CanvasTest Automation Canvas
Test Automation CanvasAndrey Rebrov
 
Implementing automation in definition of done is team effort
Implementing automation in definition of done is team effortImplementing automation in definition of done is team effort
Implementing automation in definition of done is team effortAnand Narayan Shirkande
 
TDD for Testers Workshop
TDD for Testers WorkshopTDD for Testers Workshop
TDD for Testers WorkshopSarah Usher
 
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 Reporthouseofyin
 
Testing for Agility: Bringing Testing into Everything
Testing for Agility: Bringing Testing into EverythingTesting for Agility: Bringing Testing into Everything
Testing for Agility: Bringing Testing into EverythingCamille Bell
 
Growing Manual Testers into Automators
Growing Manual Testers into AutomatorsGrowing Manual Testers into Automators
Growing Manual Testers into AutomatorsCamille Bell
 
DevOps in Action: How Nedbank went from quarterly to weekly releases in no ti...
DevOps in Action: How Nedbank went from quarterly to weekly releases in no ti...DevOps in Action: How Nedbank went from quarterly to weekly releases in no ti...
DevOps in Action: How Nedbank went from quarterly to weekly releases in no ti...Agile Software Community of India
 
Spec By Example or How to teach people talk to each other
Spec By Example or How to teach people talk to each otherSpec By Example or How to teach people talk to each other
Spec By Example or How to teach people talk to each otherAndrey Rebrov
 
Continuous Integration: Finding problems soonest
Continuous Integration: Finding problems soonestContinuous Integration: Finding problems soonest
Continuous Integration: Finding problems soonestShawn Jones
 

La actualidad más candente (20)

Agile Testing in Enterprise: Way to transform - SQA Days 2014
Agile Testing in Enterprise: Way to transform - SQA Days 2014Agile Testing in Enterprise: Way to transform - SQA Days 2014
Agile Testing in Enterprise: Way to transform - SQA Days 2014
 
How technical excellence helps in LeSS adoption
How technical excellence helps in LeSS adoptionHow technical excellence helps in LeSS adoption
How technical excellence helps in LeSS adoption
 
How testers add value to the organization appium conf
How testers add value to the organization  appium confHow testers add value to the organization  appium conf
How testers add value to the organization appium conf
 
How engineering practices help business
How engineering practices help businessHow engineering practices help business
How engineering practices help business
 
Definition Of Done
Definition Of DoneDefinition Of Done
Definition Of Done
 
ALE15 The real value of a definition of done
ALE15  The real value of a definition of doneALE15  The real value of a definition of done
ALE15 The real value of a definition of done
 
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanBehavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
 
Behavior-Driven Design: One Team's Exploration
Behavior-Driven Design: One Team's ExplorationBehavior-Driven Design: One Team's Exploration
Behavior-Driven Design: One Team's Exploration
 
Trends in Agile Testing by Lisa Crispin
Trends in Agile Testing by Lisa CrispinTrends in Agile Testing by Lisa Crispin
Trends in Agile Testing by Lisa Crispin
 
Definition of done training
Definition of done trainingDefinition of done training
Definition of done training
 
Test Automation Canvas
Test Automation CanvasTest Automation Canvas
Test Automation Canvas
 
Implementing automation in definition of done is team effort
Implementing automation in definition of done is team effortImplementing automation in definition of done is team effort
Implementing automation in definition of done is team effort
 
TDD for Testers Workshop
TDD for Testers WorkshopTDD for Testers Workshop
TDD for Testers Workshop
 
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
 
Testing for Agility: Bringing Testing into Everything
Testing for Agility: Bringing Testing into EverythingTesting for Agility: Bringing Testing into Everything
Testing for Agility: Bringing Testing into Everything
 
Growing Manual Testers into Automators
Growing Manual Testers into AutomatorsGrowing Manual Testers into Automators
Growing Manual Testers into Automators
 
DevOps in Action: How Nedbank went from quarterly to weekly releases in no ti...
DevOps in Action: How Nedbank went from quarterly to weekly releases in no ti...DevOps in Action: How Nedbank went from quarterly to weekly releases in no ti...
DevOps in Action: How Nedbank went from quarterly to weekly releases in no ti...
 
Spec By Example or How to teach people talk to each other
Spec By Example or How to teach people talk to each otherSpec By Example or How to teach people talk to each other
Spec By Example or How to teach people talk to each other
 
What is Agile Testing?
What is Agile Testing? What is Agile Testing?
What is Agile Testing?
 
Continuous Integration: Finding problems soonest
Continuous Integration: Finding problems soonestContinuous Integration: Finding problems soonest
Continuous Integration: Finding problems soonest
 

Destacado

Presentation Relocation SRS México
Presentation Relocation SRS México Presentation Relocation SRS México
Presentation Relocation SRS México SRS Relocation
 
районы киева
районы киеварайоны киева
районы киеваstepanoff_ua
 
Ordinare il Front Panel con gli splitter in LabVIEW
Ordinare il Front Panel con gli splitter in LabVIEWOrdinare il Front Panel con gli splitter in LabVIEW
Ordinare il Front Panel con gli splitter in LabVIEWNicola Bavarone
 
Premio innova s@lute2016
Premio innova s@lute2016Premio innova s@lute2016
Premio innova s@lute2016Idelfo Borgo
 
Community language learning
Community language learningCommunity language learning
Community language learningRytha Indrianti
 
B2B Magento vs. Hybris
B2B Magento vs. HybrisB2B Magento vs. Hybris
B2B Magento vs. HybrisUrszula Urban
 

Destacado (8)

Presentation Relocation SRS México
Presentation Relocation SRS México Presentation Relocation SRS México
Presentation Relocation SRS México
 
M
MM
M
 
районы киева
районы киеварайоны киева
районы киева
 
Ordinare il Front Panel con gli splitter in LabVIEW
Ordinare il Front Panel con gli splitter in LabVIEWOrdinare il Front Panel con gli splitter in LabVIEW
Ordinare il Front Panel con gli splitter in LabVIEW
 
Premio innova s@lute2016
Premio innova s@lute2016Premio innova s@lute2016
Premio innova s@lute2016
 
Tugas aplikom
Tugas aplikomTugas aplikom
Tugas aplikom
 
Community language learning
Community language learningCommunity language learning
Community language learning
 
B2B Magento vs. Hybris
B2B Magento vs. HybrisB2B Magento vs. Hybris
B2B Magento vs. Hybris
 

Similar a Developer Testing

{10.0} Test Driven Development.pptx
{10.0} Test Driven Development.pptx{10.0} Test Driven Development.pptx
{10.0} Test Driven Development.pptxAmalEldhose2
 
Creating change from within - Agile Practitioners 2012
Creating change from within - Agile Practitioners 2012Creating change from within - Agile Practitioners 2012
Creating change from within - Agile Practitioners 2012Dror Helper
 
Understanding Why Testing is Importaint
Understanding Why Testing is ImportaintUnderstanding Why Testing is Importaint
Understanding Why Testing is ImportaintSana Nasar
 
Tester Challenges in Agile ?
Tester Challenges in Agile ?Tester Challenges in Agile ?
Tester Challenges in Agile ?alind tiwari
 
Driving application development through behavior driven development
Driving application development through behavior driven developmentDriving application development through behavior driven development
Driving application development through behavior driven developmentEinar Ingebrigtsen
 
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald BelchamGetting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham.NET Conf UY
 
Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)Danny Preussler
 
Test Driven Development and Automation
Test Driven Development and AutomationTest Driven Development and Automation
Test Driven Development and AutomationMahesh Salaria
 
Completely Test-Driven
Completely Test-DrivenCompletely Test-Driven
Completely Test-DrivenIan Truslove
 
Test Driven Development with Laravel
Test Driven Development with LaravelTest Driven Development with Laravel
Test Driven Development with LaravelTyler Johnston
 
An Introduction To Software Development - Test Driven Development, Part 1
An Introduction To Software Development - Test Driven Development, Part 1An Introduction To Software Development - Test Driven Development, Part 1
An Introduction To Software Development - Test Driven Development, Part 1Blue Elephant Consulting
 
Tester career path
Tester career pathTester career path
Tester career pathgaoliang641
 
Unit Testing and Behavior Driven Testing with AngularJS - Jesse Liberty | Fal...
Unit Testing and Behavior Driven Testing with AngularJS - Jesse Liberty | Fal...Unit Testing and Behavior Driven Testing with AngularJS - Jesse Liberty | Fal...
Unit Testing and Behavior Driven Testing with AngularJS - Jesse Liberty | Fal...FalafelSoftware
 
Tdd - Test Driven Development
Tdd - Test Driven DevelopmentTdd - Test Driven Development
Tdd - Test Driven DevelopmentDavid Paluy
 
Bahaviour Driven Development
Bahaviour Driven DevelopmentBahaviour Driven Development
Bahaviour Driven Developmentbuildmaster
 

Similar a Developer Testing (20)

{10.0} Test Driven Development.pptx
{10.0} Test Driven Development.pptx{10.0} Test Driven Development.pptx
{10.0} Test Driven Development.pptx
 
Tdd
TddTdd
Tdd
 
Agile testing
Agile testingAgile testing
Agile testing
 
Creating change from within - Agile Practitioners 2012
Creating change from within - Agile Practitioners 2012Creating change from within - Agile Practitioners 2012
Creating change from within - Agile Practitioners 2012
 
Jasmine
JasmineJasmine
Jasmine
 
Understanding Why Testing is Importaint
Understanding Why Testing is ImportaintUnderstanding Why Testing is Importaint
Understanding Why Testing is Importaint
 
Tester Challenges in Agile ?
Tester Challenges in Agile ?Tester Challenges in Agile ?
Tester Challenges in Agile ?
 
Agile process
Agile processAgile process
Agile process
 
Driving application development through behavior driven development
Driving application development through behavior driven developmentDriving application development through behavior driven development
Driving application development through behavior driven development
 
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald BelchamGetting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
Getting Ahead of Delivery Issues with Deep SDLC Analysis by Donald Belcham
 
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)
 
Test Driven Development and Automation
Test Driven Development and AutomationTest Driven Development and Automation
Test Driven Development and Automation
 
Completely Test-Driven
Completely Test-DrivenCompletely Test-Driven
Completely Test-Driven
 
Test Driven Development with Laravel
Test Driven Development with LaravelTest Driven Development with Laravel
Test Driven Development with Laravel
 
An Introduction To Software Development - Test Driven Development, Part 1
An Introduction To Software Development - Test Driven Development, Part 1An Introduction To Software Development - Test Driven Development, Part 1
An Introduction To Software Development - Test Driven Development, Part 1
 
Tester career path
Tester career pathTester career path
Tester career path
 
eXtreme Programming
eXtreme ProgrammingeXtreme Programming
eXtreme Programming
 
Unit Testing and Behavior Driven Testing with AngularJS - Jesse Liberty | Fal...
Unit Testing and Behavior Driven Testing with AngularJS - Jesse Liberty | Fal...Unit Testing and Behavior Driven Testing with AngularJS - Jesse Liberty | Fal...
Unit Testing and Behavior Driven Testing with AngularJS - Jesse Liberty | Fal...
 
Tdd - Test Driven Development
Tdd - Test Driven DevelopmentTdd - Test Driven Development
Tdd - Test Driven Development
 
Bahaviour Driven Development
Bahaviour Driven DevelopmentBahaviour Driven Development
Bahaviour Driven Development
 

Último

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 

Último (20)

E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 

Developer Testing

  • 2. If it builds, ship it • Was young and foolish • Talk to a BA? QA? Never! • Just focused on writing code – not on quality code • Bugs and bugs, oh my!
  • 3. In all fairness • Was young and naïve • “It worked on my machine” • Still a start-up with a start-up mentality where the “Wild west” was accepted • But still there had to be a better way…
  • 5. Unit Tests • Focuses on the smallest testable part of an application • Independent
  • 6. Unit Testing • Cheap! • Finds problems early • Facilitates changes • Promotes decoupling • Living Documentation
  • 8. Integration Tests • Verifies functional, performance, and reliability – Do all the individual “units” work together? – Do all the combined “units” work in a performant manner? – Do all the “units” work with external resources and/or dependencies?
  • 10. Acceptance Tests • Higher-level tests that verify completeness of a user story • Written in Gherkin: Given that I’m Product Owner, When the sprint ends, Then all of the stories should meet my requirements • Highly collaborative between customers, Product Owners, BAs, QAs and Devs
  • 11. Acceptance Tests • A user story is not considered complete until the acceptance tests have passed
  • 13. UI & Manual Tests • Harder to automate • Still need to do exploratory testing
  • 14. But what about… • Regression Testing? – Rerun all of the tests we created previously • Smoke Testing? – Rerun a subset of the tests we created previously • Performance Testing? – Rerun a focused subset of the tests we created previously with concurrency and load against a benchmark
  • 15. Composition of the Tests • Happy Paths • Sad Paths • “Woah, wasn’t expecting that” Paths
  • 16. Testing Anti-Patterns • But aren’t code reviews a substitute? • But we are near the end of Project XYZ; why should we add tests now? • But couldn’t we “break” the code by adding tests? • But it will take a longer time to complete • But our code-base is too large/complex to add tests
  • 17. Test Driven Development (TDD) • Write a Test that fails • Write some code • Make all Tests pass • Refactor • Rinse and Repeat
  • 18. Behaviour Driven Development (BDD) • Write a Test* that fails • Write some code • Make all Tests pass • Refactor • Rinse and Repeat *With a different purpose in mind; acceptance
  • 19. TDD v BDD • If I am doing BDD then do I need to do TDD or vice versa? – Absolutely! – TDD makes sure you are writing the thing right; BDD makes sure you are writing the right thing
  • 20. What about Code Reviews? • Absolutely! • But the first question needs to be “show me the passing tests” • Make sure we are getting better at writing tests
  • 21. The Who • Quality is everyone’s responsibility – Devs – QAs – BAs – UX – Product Owners
  • 22. The When • During each sprint: – BA, Dev & QA all collaborating and following each story to completion • Today!
  • 23. Developer Testing • “How do I sell my executive team on doing this stuff? Don't. Just do it. They don't know what you're doing anyway” —Jim Highsmith

Notas del editor

  1. First job out of University:Consolidated tracking across 100+ websites in classic aspWanted to prove myselfLots of different websites worked differently; meant my framework needed to backwards compatible and cater for 15 ways of doing the same thingEnded up introducing a lot of bugs
  2. New Development Manager started and he called me into after a particularly bad weekSaid: “Prove to me your code works”
  3. He introduced me to Unit and Integration testsAcceptance and UI picked up laterCost of Execution/Cost of MaintenanceExecution Time also takes longer at each layerAs we get lower the closer into the code we getTherefore we can automate more and moreThus we want to place most of the effort the lower we can
  4. SMALLEST partSmaller than a method1 line of code; 1 statementIndependent of the rest of the systemIndependent of the databaseIndependent of any other testRather than praying the code works
  5. Cheap to create, cheap to maintain, cheap to runDoes it build, earliest we can catch issuesDo all these test pass – second earliest (no waiting for deployment, QA, etc)Can lean on the testsFear of breaking changes goes awayNew startersSeparation of concernsSimplifies codeRemoved “magic”Tell us what the system doesDon’t have to “dig into the code”Writing them in business language
  6. Focused on making sure that one line of code worksArrange, Act, AssertAlso Business Speak, Given, When, Then (covered later with Acceptance Tests)
  7. Once we start putting each part together does the system still work?Once we start putting each part together does it all perform as we would expect Can we catch issues lower than Page XYZ is “slow”Can we access the database, a schema change hasn’t broken the codeBuilds upon Unit Tests:Still relatively cheap – may need an environment to execute inShould still be independent!
  8. Ah Business Value!Meets the customers requirements
  9. No sense if building the swing on the left if the customer wants the swing on the right
  10. Yvette’s Fashion and Costume shop – meets all the acceptances tests and works bug free; however…Exploratory testing to discover new scenarios and test casesBut once repeatable lets automate it!
  11. Happy Kenau - The scenarios we want to happen; the expected behaviour of the system - Positive casesSad Kenau - The scenarios where it won’t work - Negative casesWoahKenau - Extreme edge cases, ie Database connection dies, out of disk space, etc
  12. Code Reviews: No, they are still manual and therefore inherently unrepeatable Can they catch every possible scenario?End of Project: Is it the end of the application’s lifecycle? How much longer will we need to support it? If we have to do any change, we need testsBreak by Adding tests Absolutely; however, we can write a test for that! Couldn’t you break the code by adding new code anyway?Longer to complete Does it really take longer? Imagine if you didn’t have to go back and fix any bugs or have QA fail a user story and you have to figure out why There is an upfront cost; however, quality will always make you pay – and that can be pay me now or pay me later (and later is always more costly) Similar to we have to deliver by date x Then this is all the more reason not an excuse to throw them outLarge/Complex If it is too large/complex to test then it is too large/complex to add any kind of change We need to simplify and testing helps us achieve that
  13. Testing is a first class citizenVIP of our code baseWe test as we go firstWe clean up as we goWe are constantly simplifying
  14. TDD – the thing rightBDD – the right thing
  15. Devs - You are the closes to the code and the ones making the changes - Measure twice before cuttingQAs - You are our ultimately quality gatekeepers; ensuring that the functionally produced meets the requirementsBAs - Get in there, help write acceptance tests for Devs and QAs to work fromUX - Test frameworks for javascript - UI from the beginningProduct Owners - need to understand that delivery on scope and on time sacrifices quality - delivering quality on time while sacrificing scope is always betterEveryone else -
  16. During each sprint, let’s collaborate for each story. As the BA is flushing out the acceptance criteria the Dev is writing the unit, integration tests and ultimately the code for it and the QA is writing the acceptance test for it.Let’s stop catapulting over the walls!A lot of these practises we can start today! They aren’t technology dependent.Any new development initiatives/projects, lets start incorporating these methods.Any existing let’s start looking at how we can make them testableThose using .net, your lives will be easierThose not, there is hope
  17. *They expect you are doing anywayAny code in your project – regardless if you wrote it – is YOUR codeYour career - Check Job BoardsDo your own researchRead from our Library:The Pragmatic ProgrammerClean CodeTest Driven DevelopmentTrainingWhat else?Try it; what doyou have to lose?Understand and embrace that proving the code quality is beneficial to everyone
  18. Prove to each other your code works