SlideShare a Scribd company logo
1 of 29
The What, Why and How of Unit Testing
Annette Allen
Who is Annette Allen
 DBA/Dev for 14 years
 Joint Chapter Leader of SQL South West based in the South
West of England
 Event organiser
 Friend of Red Gate
 UK Regional Mentor
Agenda
 Why do we test?
 What we test?
 How do we test?
Why
Why get requirements?
Requirements
Acceptance Criteria
Test List
How do we get requirements?
 Conversation
 Email
 Backlog
I want . . . . .
Speak to stakeholder
 I want. . . . .
 A car that is cheap, young and practical
Requirements
 I want:
 “A list of cars that are cheap, young and practical”
Requirements
 “I need a car that is under 5 years old, costs less than £10k can
do more than 40mpg and can take 4 people”.
Tests
 1. Price is under £10k
 2. Age is under 5
 3. Seats >= 4
 4. Fuel economy > 40 mpg
Acceptance Criteria
 The car must be under 5 years old
 The car must cost less than £10k
 The car must have at least 4 seats
 It must do at least 40 mpg
What have we learned?
 Ask questions
 Ensure no misunderstanding
 Confirm requirements
 Measurable
 Quantifiable
Requirements gathering
 I need a report showing current, good applicants.
Requirements gathering
 Applicant = flag in system
 Current = applied for intake to start September 2016
 Good = must have at least 3 predicted A Levels at AAA, AAB or
ABB
Tests
 Applicant = Yes
 Start Date > 1 September 2016
 Predicted grade tests x 4:
 AAA is included
 AAB is included
 ABB is included
 BBB is excluded
Anything else?
How do we test
 tSQLt
 Community tool
 Licence free
 Redgate SQL Test
 Fully licenced and supported product
 Part of the Developer suite
Using tSQLt
 Test Class
 All tests must start with the word ‘test’
 Names should define what’s being tested
 Tests should test 1 thing and 1 thing only
Test Object Hierarchy
GetListOfPracticalCars
GetListOfPracticalCars
Database object
Test Class
GetListOfPracticalCars.[TestAge] Test object
GetListOfPracticalCars.[TestPrice] Test object
How does this work?
 Fake everything
 Functions
 Data
 All other objects relied upon by the object tested
What is Test Driven Development
Test-driven development (TDD) is a software development
process that relies on the repetition of a very short development
cycle: first the developer writes an (initially failing) automated test
case that defines a desired improvement or new function, then
produces the minimum amount of code to pass that test, and
finally refactors the new code to acceptable standards. Kent Beck,
who is credited with having developed or 'rediscovered'[1] the
technique, stated in 2003 that TDD encourages simple designs and
inspires confidence.[2]
Taken from Wikipedia – Nov 2015
Demo
Downloads
 http://tsqlt.org/downloads/
 https://www.red-gate.com/products/sql-development/sql-test/
Contact me
 Annette@sqlsouthwest.co.uk
 @Mrs_Fatherjack

More Related Content

Viewers also liked

Students for Kansas equality
Students for Kansas equalityStudents for Kansas equality
Students for Kansas equalityPeggy Bennett
 
Practical Agile. Lessons learned the hard way on our journey building digita...
Practical Agile.  Lessons learned the hard way on our journey building digita...Practical Agile.  Lessons learned the hard way on our journey building digita...
Practical Agile. Lessons learned the hard way on our journey building digita...TechExeter
 
Practicacalificadadearticulodeopinion
PracticacalificadadearticulodeopinionPracticacalificadadearticulodeopinion
Practicacalificadadearticulodeopiniondanielafrancisca22
 
This Is Where We Where: A TIWWA @ Tate Modern Post Mortem
This Is Where We Where: A TIWWA @ Tate Modern Post MortemThis Is Where We Where: A TIWWA @ Tate Modern Post Mortem
This Is Where We Where: A TIWWA @ Tate Modern Post MortemTechExeter
 
Silva_et_al-2016-European_Journal_of_Neuroscience
Silva_et_al-2016-European_Journal_of_NeuroscienceSilva_et_al-2016-European_Journal_of_Neuroscience
Silva_et_al-2016-European_Journal_of_NeuroscienceRachel Cuozzo
 
Doing Our Part LinkedIn
Doing Our Part LinkedInDoing Our Part LinkedIn
Doing Our Part LinkedInRichard Wiebe
 
мухтар дастан+Arduino programmingschool+клиенты
мухтар дастан+Arduino programmingschool+клиентымухтар дастан+Arduino programmingschool+клиенты
мухтар дастан+Arduino programmingschool+клиентыDastan Mukhtar
 
Simplify, Isolate and Scale with RabbitMQ
 Simplify, Isolate and Scale with RabbitMQ  Simplify, Isolate and Scale with RabbitMQ
Simplify, Isolate and Scale with RabbitMQ TechExeter
 
Data Science in the cloud with Microsoft Azure
Data Science in the cloud with Microsoft Azure Data Science in the cloud with Microsoft Azure
Data Science in the cloud with Microsoft Azure TechExeter
 
Introduction to Webgl by Rachel Prudden
Introduction to Webgl by Rachel PruddenIntroduction to Webgl by Rachel Prudden
Introduction to Webgl by Rachel PruddenTechExeter
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic AlgorithmsTechExeter
 
Automated deployments using envoy by John Blackmore
Automated deployments using envoy by John BlackmoreAutomated deployments using envoy by John Blackmore
Automated deployments using envoy by John BlackmoreTechExeter
 

Viewers also liked (16)

Mitos griegos
Mitos griegosMitos griegos
Mitos griegos
 
Students for Kansas equality
Students for Kansas equalityStudents for Kansas equality
Students for Kansas equality
 
Practical Agile. Lessons learned the hard way on our journey building digita...
Practical Agile.  Lessons learned the hard way on our journey building digita...Practical Agile.  Lessons learned the hard way on our journey building digita...
Practical Agile. Lessons learned the hard way on our journey building digita...
 
Practicacalificadadearticulodeopinion
PracticacalificadadearticulodeopinionPracticacalificadadearticulodeopinion
Practicacalificadadearticulodeopinion
 
This Is Where We Where: A TIWWA @ Tate Modern Post Mortem
This Is Where We Where: A TIWWA @ Tate Modern Post MortemThis Is Where We Where: A TIWWA @ Tate Modern Post Mortem
This Is Where We Where: A TIWWA @ Tate Modern Post Mortem
 
Silva_et_al-2016-European_Journal_of_Neuroscience
Silva_et_al-2016-European_Journal_of_NeuroscienceSilva_et_al-2016-European_Journal_of_Neuroscience
Silva_et_al-2016-European_Journal_of_Neuroscience
 
La mitología Persa
La mitología PersaLa mitología Persa
La mitología Persa
 
sukh
sukhsukh
sukh
 
Doing Our Part LinkedIn
Doing Our Part LinkedInDoing Our Part LinkedIn
Doing Our Part LinkedIn
 
мухтар дастан+Arduino programmingschool+клиенты
мухтар дастан+Arduino programmingschool+клиентымухтар дастан+Arduino programmingschool+клиенты
мухтар дастан+Arduino programmingschool+клиенты
 
Comunicación 2
Comunicación 2Comunicación 2
Comunicación 2
 
Simplify, Isolate and Scale with RabbitMQ
 Simplify, Isolate and Scale with RabbitMQ  Simplify, Isolate and Scale with RabbitMQ
Simplify, Isolate and Scale with RabbitMQ
 
Data Science in the cloud with Microsoft Azure
Data Science in the cloud with Microsoft Azure Data Science in the cloud with Microsoft Azure
Data Science in the cloud with Microsoft Azure
 
Introduction to Webgl by Rachel Prudden
Introduction to Webgl by Rachel PruddenIntroduction to Webgl by Rachel Prudden
Introduction to Webgl by Rachel Prudden
 
Genetic Algorithms
Genetic AlgorithmsGenetic Algorithms
Genetic Algorithms
 
Automated deployments using envoy by John Blackmore
Automated deployments using envoy by John BlackmoreAutomated deployments using envoy by John Blackmore
Automated deployments using envoy by John Blackmore
 

Similar to The what, why and how of Unit Testing with SQL Server

Agile Testing
Agile TestingAgile Testing
Agile Testingmultunus
 
Ten Steps To Success
Ten Steps To SuccessTen Steps To Success
Ten Steps To SuccessMohan Dutt
 
Workshop: Behavior Driven Development - Deliver value by Naveen Kumar Singh
Workshop: Behavior Driven Development - Deliver value by Naveen Kumar SinghWorkshop: Behavior Driven Development - Deliver value by Naveen Kumar Singh
Workshop: Behavior Driven Development - Deliver value by Naveen Kumar SinghAgile ME
 
CBAP Certification Overview
CBAP Certification OverviewCBAP Certification Overview
CBAP Certification OverviewTechcanvass
 
Agille Testing Meetup 1
Agille Testing Meetup 1Agille Testing Meetup 1
Agille Testing Meetup 1Nathan Bain
 
Odesk Webinar - Building Your Workteam
Odesk Webinar - Building Your WorkteamOdesk Webinar - Building Your Workteam
Odesk Webinar - Building Your WorkteamAmit Bakshi
 
Ten Steps to Success
Ten Steps to SuccessTen Steps to Success
Ten Steps to SuccessMohan Dutt
 
Agile testing practice
Agile testing practiceAgile testing practice
Agile testing practiceMary Jiang
 
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
 
How to become API Tester with No IT experience_ .pptx
How to become API Tester with No IT experience_ .pptxHow to become API Tester with No IT experience_ .pptx
How to become API Tester with No IT experience_ .pptxInfotek Solutions
 
Test for Success: A Guide to A/B Testing on Emails
Test for Success: A Guide to A/B Testing on EmailsTest for Success: A Guide to A/B Testing on Emails
Test for Success: A Guide to A/B Testing on EmailsMarketo
 
Test analysis & design good practices@TDT Iasi 17Oct2013
Test analysis & design   good practices@TDT Iasi 17Oct2013Test analysis & design   good practices@TDT Iasi 17Oct2013
Test analysis & design good practices@TDT Iasi 17Oct2013Tabăra de Testare
 
Guidelines to Measuring Test Automation ROI
 Guidelines to Measuring Test Automation ROI Guidelines to Measuring Test Automation ROI
Guidelines to Measuring Test Automation ROIPerfecto by Perforce
 
How to establish ways of working that allows shifting-left of the automation ...
How to establish ways of working that allows shifting-left of the automation ...How to establish ways of working that allows shifting-left of the automation ...
How to establish ways of working that allows shifting-left of the automation ...Max Barrass
 
Implement BDD with Cucumber and SpecFlow
Implement BDD with Cucumber and SpecFlowImplement BDD with Cucumber and SpecFlow
Implement BDD with Cucumber and SpecFlowTechWell
 
So Your Boss Wants You to Performance Test Blackboard
So Your Boss Wants You to Performance Test BlackboardSo Your Boss Wants You to Performance Test Blackboard
So Your Boss Wants You to Performance Test BlackboardSteve Feldman
 
Tech talks #1- Unit testing and TDD
Tech talks #1- Unit testing and TDDTech talks #1- Unit testing and TDD
Tech talks #1- Unit testing and TDDDUONG Trong Tan
 

Similar to The what, why and how of Unit Testing with SQL Server (20)

Agile Testing
Agile TestingAgile Testing
Agile Testing
 
Ten Steps To Success
Ten Steps To SuccessTen Steps To Success
Ten Steps To Success
 
Workshop: Behavior Driven Development - Deliver value by Naveen Kumar Singh
Workshop: Behavior Driven Development - Deliver value by Naveen Kumar SinghWorkshop: Behavior Driven Development - Deliver value by Naveen Kumar Singh
Workshop: Behavior Driven Development - Deliver value by Naveen Kumar Singh
 
CBAP Certification Overview
CBAP Certification OverviewCBAP Certification Overview
CBAP Certification Overview
 
Agille Testing Meetup 1
Agille Testing Meetup 1Agille Testing Meetup 1
Agille Testing Meetup 1
 
Odesk Webinar - Building Your Workteam
Odesk Webinar - Building Your WorkteamOdesk Webinar - Building Your Workteam
Odesk Webinar - Building Your Workteam
 
Ten Steps to Success
Ten Steps to SuccessTen Steps to Success
Ten Steps to Success
 
Atdd half day_new_1_up
Atdd half day_new_1_upAtdd half day_new_1_up
Atdd half day_new_1_up
 
Agile testing practice
Agile testing practiceAgile testing practice
Agile testing practice
 
Agile Testing
Agile TestingAgile Testing
Agile Testing
 
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
 
How to become API Tester with No IT experience_ .pptx
How to become API Tester with No IT experience_ .pptxHow to become API Tester with No IT experience_ .pptx
How to become API Tester with No IT experience_ .pptx
 
Test for Success: A Guide to A/B Testing on Emails
Test for Success: A Guide to A/B Testing on EmailsTest for Success: A Guide to A/B Testing on Emails
Test for Success: A Guide to A/B Testing on Emails
 
So You Want to be a CPLP
So You Want to be a CPLPSo You Want to be a CPLP
So You Want to be a CPLP
 
Test analysis & design good practices@TDT Iasi 17Oct2013
Test analysis & design   good practices@TDT Iasi 17Oct2013Test analysis & design   good practices@TDT Iasi 17Oct2013
Test analysis & design good practices@TDT Iasi 17Oct2013
 
Guidelines to Measuring Test Automation ROI
 Guidelines to Measuring Test Automation ROI Guidelines to Measuring Test Automation ROI
Guidelines to Measuring Test Automation ROI
 
How to establish ways of working that allows shifting-left of the automation ...
How to establish ways of working that allows shifting-left of the automation ...How to establish ways of working that allows shifting-left of the automation ...
How to establish ways of working that allows shifting-left of the automation ...
 
Implement BDD with Cucumber and SpecFlow
Implement BDD with Cucumber and SpecFlowImplement BDD with Cucumber and SpecFlow
Implement BDD with Cucumber and SpecFlow
 
So Your Boss Wants You to Performance Test Blackboard
So Your Boss Wants You to Performance Test BlackboardSo Your Boss Wants You to Performance Test Blackboard
So Your Boss Wants You to Performance Test Blackboard
 
Tech talks #1- Unit testing and TDD
Tech talks #1- Unit testing and TDDTech talks #1- Unit testing and TDD
Tech talks #1- Unit testing and TDD
 

More from TechExeter

Exeter Science Centre, by Natalie Whitehead
Exeter Science Centre, by Natalie WhiteheadExeter Science Centre, by Natalie Whitehead
Exeter Science Centre, by Natalie WhiteheadTechExeter
 
South West InternetOfThings Network by Wo King
South West InternetOfThings Network by Wo KingSouth West InternetOfThings Network by Wo King
South West InternetOfThings Network by Wo KingTechExeter
 
Generative Adversarial Networks by Tariq Rashid
Generative Adversarial Networks by Tariq RashidGenerative Adversarial Networks by Tariq Rashid
Generative Adversarial Networks by Tariq RashidTechExeter
 
Conf 2019 - Workshop: Liam Glanfield - know your threat actor
Conf 2019 - Workshop: Liam Glanfield - know your threat actorConf 2019 - Workshop: Liam Glanfield - know your threat actor
Conf 2019 - Workshop: Liam Glanfield - know your threat actorTechExeter
 
Conf 2018 Track 1 - Unicorns aren't real
Conf 2018 Track 1 - Unicorns aren't realConf 2018 Track 1 - Unicorns aren't real
Conf 2018 Track 1 - Unicorns aren't realTechExeter
 
Conf 2018 Track 1 - Aerospace Innovation
Conf 2018 Track 1 - Aerospace InnovationConf 2018 Track 1 - Aerospace Innovation
Conf 2018 Track 1 - Aerospace InnovationTechExeter
 
Conf 2018 Track 2 - Try Elm
Conf 2018 Track 2 - Try ElmConf 2018 Track 2 - Try Elm
Conf 2018 Track 2 - Try ElmTechExeter
 
Conf 2018 Track 3 - Creating marine geospatial services
Conf 2018 Track 3 - Creating marine geospatial servicesConf 2018 Track 3 - Creating marine geospatial services
Conf 2018 Track 3 - Creating marine geospatial servicesTechExeter
 
Conf 2018 Track 2 - Machine Learning with TensorFlow
Conf 2018 Track 2 - Machine Learning with TensorFlowConf 2018 Track 2 - Machine Learning with TensorFlow
Conf 2018 Track 2 - Machine Learning with TensorFlowTechExeter
 
Conf 2018 Track 2 - Custom Web Elements with Stencil
Conf 2018 Track 2 - Custom Web Elements with StencilConf 2018 Track 2 - Custom Web Elements with Stencil
Conf 2018 Track 2 - Custom Web Elements with StencilTechExeter
 
Conf 2018 Track 1 - Tessl / revolutionising the house moving process
Conf 2018 Track 1 - Tessl / revolutionising the house moving processConf 2018 Track 1 - Tessl / revolutionising the house moving process
Conf 2018 Track 1 - Tessl / revolutionising the house moving processTechExeter
 
Conf 2018 Keynote - Andy Stanford-Clark, CTO IBM UK
Conf 2018 Keynote - Andy Stanford-Clark, CTO IBM UKConf 2018 Keynote - Andy Stanford-Clark, CTO IBM UK
Conf 2018 Keynote - Andy Stanford-Clark, CTO IBM UKTechExeter
 
Conf 2018 Track 3 - Microservices - What I've learned after a year building s...
Conf 2018 Track 3 - Microservices - What I've learned after a year building s...Conf 2018 Track 3 - Microservices - What I've learned after a year building s...
Conf 2018 Track 3 - Microservices - What I've learned after a year building s...TechExeter
 
Gps behaving badly - Guy Busenel
Gps behaving badly - Guy BusenelGps behaving badly - Guy Busenel
Gps behaving badly - Guy BusenelTechExeter
 
Why Isn't My Query Using an Index?: An Introduction to SQL Performance
Why Isn't My Query Using an Index?: An Introduction to SQL Performance Why Isn't My Query Using an Index?: An Introduction to SQL Performance
Why Isn't My Query Using an Index?: An Introduction to SQL Performance TechExeter
 
Turning Developers into Testers
Turning Developers into TestersTurning Developers into Testers
Turning Developers into TestersTechExeter
 
Remote working
Remote workingRemote working
Remote workingTechExeter
 
Developing an Agile Mindset
Developing an Agile Mindset Developing an Agile Mindset
Developing an Agile Mindset TechExeter
 
Think like a gardener
Think like a gardenerThink like a gardener
Think like a gardenerTechExeter
 
The trials and tribulations of providing engineering infrastructure
 The trials and tribulations of providing engineering infrastructure  The trials and tribulations of providing engineering infrastructure
The trials and tribulations of providing engineering infrastructure TechExeter
 

More from TechExeter (20)

Exeter Science Centre, by Natalie Whitehead
Exeter Science Centre, by Natalie WhiteheadExeter Science Centre, by Natalie Whitehead
Exeter Science Centre, by Natalie Whitehead
 
South West InternetOfThings Network by Wo King
South West InternetOfThings Network by Wo KingSouth West InternetOfThings Network by Wo King
South West InternetOfThings Network by Wo King
 
Generative Adversarial Networks by Tariq Rashid
Generative Adversarial Networks by Tariq RashidGenerative Adversarial Networks by Tariq Rashid
Generative Adversarial Networks by Tariq Rashid
 
Conf 2019 - Workshop: Liam Glanfield - know your threat actor
Conf 2019 - Workshop: Liam Glanfield - know your threat actorConf 2019 - Workshop: Liam Glanfield - know your threat actor
Conf 2019 - Workshop: Liam Glanfield - know your threat actor
 
Conf 2018 Track 1 - Unicorns aren't real
Conf 2018 Track 1 - Unicorns aren't realConf 2018 Track 1 - Unicorns aren't real
Conf 2018 Track 1 - Unicorns aren't real
 
Conf 2018 Track 1 - Aerospace Innovation
Conf 2018 Track 1 - Aerospace InnovationConf 2018 Track 1 - Aerospace Innovation
Conf 2018 Track 1 - Aerospace Innovation
 
Conf 2018 Track 2 - Try Elm
Conf 2018 Track 2 - Try ElmConf 2018 Track 2 - Try Elm
Conf 2018 Track 2 - Try Elm
 
Conf 2018 Track 3 - Creating marine geospatial services
Conf 2018 Track 3 - Creating marine geospatial servicesConf 2018 Track 3 - Creating marine geospatial services
Conf 2018 Track 3 - Creating marine geospatial services
 
Conf 2018 Track 2 - Machine Learning with TensorFlow
Conf 2018 Track 2 - Machine Learning with TensorFlowConf 2018 Track 2 - Machine Learning with TensorFlow
Conf 2018 Track 2 - Machine Learning with TensorFlow
 
Conf 2018 Track 2 - Custom Web Elements with Stencil
Conf 2018 Track 2 - Custom Web Elements with StencilConf 2018 Track 2 - Custom Web Elements with Stencil
Conf 2018 Track 2 - Custom Web Elements with Stencil
 
Conf 2018 Track 1 - Tessl / revolutionising the house moving process
Conf 2018 Track 1 - Tessl / revolutionising the house moving processConf 2018 Track 1 - Tessl / revolutionising the house moving process
Conf 2018 Track 1 - Tessl / revolutionising the house moving process
 
Conf 2018 Keynote - Andy Stanford-Clark, CTO IBM UK
Conf 2018 Keynote - Andy Stanford-Clark, CTO IBM UKConf 2018 Keynote - Andy Stanford-Clark, CTO IBM UK
Conf 2018 Keynote - Andy Stanford-Clark, CTO IBM UK
 
Conf 2018 Track 3 - Microservices - What I've learned after a year building s...
Conf 2018 Track 3 - Microservices - What I've learned after a year building s...Conf 2018 Track 3 - Microservices - What I've learned after a year building s...
Conf 2018 Track 3 - Microservices - What I've learned after a year building s...
 
Gps behaving badly - Guy Busenel
Gps behaving badly - Guy BusenelGps behaving badly - Guy Busenel
Gps behaving badly - Guy Busenel
 
Why Isn't My Query Using an Index?: An Introduction to SQL Performance
Why Isn't My Query Using an Index?: An Introduction to SQL Performance Why Isn't My Query Using an Index?: An Introduction to SQL Performance
Why Isn't My Query Using an Index?: An Introduction to SQL Performance
 
Turning Developers into Testers
Turning Developers into TestersTurning Developers into Testers
Turning Developers into Testers
 
Remote working
Remote workingRemote working
Remote working
 
Developing an Agile Mindset
Developing an Agile Mindset Developing an Agile Mindset
Developing an Agile Mindset
 
Think like a gardener
Think like a gardenerThink like a gardener
Think like a gardener
 
The trials and tribulations of providing engineering infrastructure
 The trials and tribulations of providing engineering infrastructure  The trials and tribulations of providing engineering infrastructure
The trials and tribulations of providing engineering infrastructure
 

Recently uploaded

Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
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
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
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
 
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
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

Recently uploaded (20)

Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
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
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
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
 
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
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

The what, why and how of Unit Testing with SQL Server

Editor's Notes

  1. 3 main reasons, To prove that the code is working as expected To have confidence in code we have written Give us the ability to change code knowing that what we have amended will not introduce errors when deployed
  2. So broken car = can’t get anywhere So husband is away I decide to go car shopping 
  3. Go the garage and hey I’ve just had a PPI claim so I decide to buy my dream car
  4. When husband gets home he’s not as excited by me. It’s not practical, economical or cheap in any way. It’s fun though 
  5. What tests would we write? What’s missing from this statement? What defines a child and who should get presents?
  6. Must be on Father Christmas’ nice list, he’s updating the details throughout the year and has an undecided box until Christmas Eve Father Christmas would need a report showing who is undecided to ensure he can categorise them When designing this it took many goes to work out the actual requirements. When should they be under 16, what is deemed nice. For example they should be under 16, when on Christmas Day, Today, January 1st. This all needs to be defined and questions need to be asked.
  7. What have we missed? Possible test for children who are 17 are not returned Need to test for multiple rows
  8. Before we can start writing tests we need to know the criteria to which they must match Our requirements become our acceptance criteria which in turn becomes our tests For each item in our acceptance criteria it will become a test: Less than 5 years old Less than £10k More than 40 mpg Able to take 4 people comfortably Real world example, returning data within half second –does the company have the resource to throw at the hardware required for this?
  9. What about those students who have 4 predicated Grades, currently those tests may exclude those so we have to ensure that tests are written to include those. You can now see how lists of tests can build up, but without that we may have given the wrong results but excluding those with 4 predicted grades.
  10. tSQLt – written by Sebastian Maine and Dennis Lloyd, completely free Redgate SQL test - they used tSQLt but put a nice front end on it. Included in Developer suite and is paid for. Trial version available. I have a licence to give away during th is session. All on Test/development server, this should not occur on a production environment
  11. A test class is a collection of tests Named after the object they are testing e.G Function GetListOfPracticalCars The class name is the name of the object e.g. GetListOfPracticalCars The test name is a description of what the test is carry out You do need set trustworthy on however test is only run on test/dev boxes. Tests should NOT be run on prod dbs
  12. Fake every object our test subject interacts with Idempotent!!! It is infinitely repeatable with the same result Fake all surrounding objects so that you can control their interaction with the test subject and then you know that any changes have been introduced by your changes in code and no external factors.
  13. Otherwise known as TDD Work out what tests are required as a team Then create a stub for what you are testing e.g. stored procedure Then write all the tests Which will all fail Then write the stored procedure Run all the tests