SlideShare a Scribd company logo
SOFTWARE
DEVELOPMENT
PROCESS
(TDD)
Autumn 1398
Amin Taheri @ Shenasa-ai.ir
#TODO
■ Definition of Software Development Process
■ Domain Driven Development (DDD)
■ Continuous Integration (CI)
■ Behavior Driven Development (BDD)
■ Extreme Programming (XP)
– Pair programming
– Standup meetings
■ Test Driven Development (TDD)
■ Hands of TDD (Live coding)
Definition of Software Development Process
■ Dividing Project into phases
■ A.K.A Software development Life-Cycle
■ Improving
– Design
– Product management
– Project management
Planning Analysis Design Development
and implement Testing Maintenance
Domain Driven development
■ How the Application should behave
■ Consider System as Black Box
■ Common Language
■ Define User story
– As a :
– I want :
– So That :
Continuous
Integration
(CI)
■ AKA Continuous
delivery
Behavior Driven Development
■ TDD + DDD
■ 3 phase of TDD
■ Common language of DDD
Extreme programming (XP)
■ TDD
■ Agile
■ DDD
■ CI
Pair programming
■ two programmers work together at one workstation
■ The two programmers switch roles frequently.
■ 3 kind of situation
– Novice & Novice (better together than solo)
– Pro & Novice (mentor apprentice)
– Pro & Pro (Can Also be good)
Test Driven Development (TDD)
■ Red, Green, Refactor
■ TDD is :
– define a test set for the unit first;
– make the tests fail;
– then implement the unit;
– finally verify that the implementation of the unit makes the tests succeed.
We will get to the details, Hold on!
TDD continued
More on TDD
More on TDD
Levels of testing
■ Unit test : function
■ Test suit : combination of unit test
■ Component testing
■ System testing
■ Performance testing : throughput, speed, memory management, etc.
How to test
■ #production code
■ # a unit test
– Setup
– Action
– Assert
Talk is cheap, show me the code!
-Linus Trovalds
Advantages of TDD
■ Changing becomes easy
■ Imminent feedback
■ Document what the code is doing
– by writing informative names for unit tests
■ Make a Good Object Oriented Design
Uncle Bob!
■ 3 law of TDD by uncle bob :
– do not write any production code before unit test
– you should not write a very complicated unit test
– you should not write any more production code than is sufficient to pass the
one failing unit test
■ this cycle of testing writing unit test and testing should not last longer than couple of
minutes
■ every unit test should test something new and do not test something that have been
tested before
Annotations
■ Functions:
– Def test_* ():
■ Class :
– Class Test_*
– Not having a __init__ func
■ filenames of test should start with "test_"
Acceptance Test-Driven Development
(ATDD)
■ includes customers, testers, and developers into the loop.
■ all project members understand what needs to be done
■ Advantages of Acceptance Test-Driven Development
– As we have ATDD very first, so it helps to reduce defect and bug fixing effort as
the project progresses.
– ATDD only focus on ‘What’ and not ‘How’.
– ATDD makes developers, testers, and customers to work together, this helps to
understand what is required from the system
Testing tips and tricks
■ Should be able to run frequently and fast
■ Automated testing
■ Different environments
– Production
– Development
■ Do not write all unit test or production at once! Follow the cycle
■ Do the simplest test case
■ do not jump into complex unit test
Tips and tricks continued
■ Use descriptive test case names
■ Unit test is the best document for code
■ Keep your unit test to run fast
■ Keep console output minimal
■ Use code coverage tools to determine that you cover all of your codes
■ Using code analysis tools such as Pylint
To read
■ Books
– Robert martin (the uncle bob)’s clean code
– Kent beck test driven development
■ Blogs
– https://towardsdatascience.com/tdd-datascience-689c98492fcc
– https://www.xenonstack.com/blog/machine-learning-unit-testing/
THANK YOU FOR YOUR
ATTENTION
Any questions?

More Related Content

What's hot

Test-Driven Development (TDD) in Swift
Test-Driven Development (TDD) in SwiftTest-Driven Development (TDD) in Swift
Test-Driven Development (TDD) in Swift
Amey Tavkar
 
Tdd in swift
Tdd in swiftTdd in swift
Tdd in swift
Javal Nanda
 
Steve Jones - Team-based Version Control
Steve Jones - Team-based Version ControlSteve Jones - Team-based Version Control
Steve Jones - Team-based Version Control
Red Gate Software
 
PHP Code Quality
PHP Code QualityPHP Code Quality
PHP Code Quality
Usman Zafar
 
Don't Suck at Building Stuff - Mykel Alvis at Puppet Camp Altanta
Don't Suck at Building Stuff  - Mykel Alvis at Puppet Camp AltantaDon't Suck at Building Stuff  - Mykel Alvis at Puppet Camp Altanta
Don't Suck at Building Stuff - Mykel Alvis at Puppet Camp Altanta
Puppet
 
Delhi first draft_2
Delhi first draft_2Delhi first draft_2
Delhi first draft_2
vaibhav lokhande
 
Einführung Test-driven Development
Einführung Test-driven DevelopmentEinführung Test-driven Development
Einführung Test-driven Development
Timo Stollenwerk
 
xUnit test patterns 0
xUnit test patterns 0xUnit test patterns 0
xUnit test patterns 0
Stanislav Petrov
 
hashdays 2012 Lightning Talk - Holistic Server Security
hashdays 2012 Lightning Talk - Holistic Server Securityhashdays 2012 Lightning Talk - Holistic Server Security
hashdays 2012 Lightning Talk - Holistic Server Security
Sean Rütschi
 
CI/CD and automated Test
CI/CD and automated TestCI/CD and automated Test
CI/CD and automated Test
Joe Phan
 
Continuous inspection with Sonar
Continuous inspection with SonarContinuous inspection with Sonar
Continuous inspection with Sonar
gaudol
 
The Problems with Redux: Are MobX and Realm going to put and end to it?
The Problems with Redux: Are MobX and Realm going to put and end to it?The Problems with Redux: Are MobX and Realm going to put and end to it?
The Problems with Redux: Are MobX and Realm going to put and end to it?
Quantum Mob
 
What Is Cucumber?
What Is Cucumber?What Is Cucumber?
What Is Cucumber?
QATestLab
 
Timeboxed releases - Peter Antman
Timeboxed releases - Peter AntmanTimeboxed releases - Peter Antman
Timeboxed releases - Peter Antman
manssandstrom
 
RoboCon 2018: How did we get here? Where do we go next?
RoboCon 2018: How did we get here? Where do we go next?RoboCon 2018: How did we get here? Where do we go next?
RoboCon 2018: How did we get here? Where do we go next?
Pekka Klärck
 
Developers on test
Developers on testDevelopers on test
Developers on test
Datio Big Data
 
Put "fast" back in "fast feedback"
Put "fast" back in "fast feedback"Put "fast" back in "fast feedback"
Put "fast" back in "fast feedback"
Lars Thorup
 
Automation using RobotFramework for embedded device
Automation using RobotFramework for embedded deviceAutomation using RobotFramework for embedded device
Automation using RobotFramework for embedded device
Srix Sriramkumar
 
Php Inspections (EA Extended): The Cookbook
Php Inspections (EA Extended): The CookbookPhp Inspections (EA Extended): The Cookbook
Php Inspections (EA Extended): The Cookbook
Vladimir Reznichenko
 
Lighning Talk: PHP build process
Lighning Talk: PHP build processLighning Talk: PHP build process
Lighning Talk: PHP build process
Bryan Agee
 

What's hot (20)

Test-Driven Development (TDD) in Swift
Test-Driven Development (TDD) in SwiftTest-Driven Development (TDD) in Swift
Test-Driven Development (TDD) in Swift
 
Tdd in swift
Tdd in swiftTdd in swift
Tdd in swift
 
Steve Jones - Team-based Version Control
Steve Jones - Team-based Version ControlSteve Jones - Team-based Version Control
Steve Jones - Team-based Version Control
 
PHP Code Quality
PHP Code QualityPHP Code Quality
PHP Code Quality
 
Don't Suck at Building Stuff - Mykel Alvis at Puppet Camp Altanta
Don't Suck at Building Stuff  - Mykel Alvis at Puppet Camp AltantaDon't Suck at Building Stuff  - Mykel Alvis at Puppet Camp Altanta
Don't Suck at Building Stuff - Mykel Alvis at Puppet Camp Altanta
 
Delhi first draft_2
Delhi first draft_2Delhi first draft_2
Delhi first draft_2
 
Einführung Test-driven Development
Einführung Test-driven DevelopmentEinführung Test-driven Development
Einführung Test-driven Development
 
xUnit test patterns 0
xUnit test patterns 0xUnit test patterns 0
xUnit test patterns 0
 
hashdays 2012 Lightning Talk - Holistic Server Security
hashdays 2012 Lightning Talk - Holistic Server Securityhashdays 2012 Lightning Talk - Holistic Server Security
hashdays 2012 Lightning Talk - Holistic Server Security
 
CI/CD and automated Test
CI/CD and automated TestCI/CD and automated Test
CI/CD and automated Test
 
Continuous inspection with Sonar
Continuous inspection with SonarContinuous inspection with Sonar
Continuous inspection with Sonar
 
The Problems with Redux: Are MobX and Realm going to put and end to it?
The Problems with Redux: Are MobX and Realm going to put and end to it?The Problems with Redux: Are MobX and Realm going to put and end to it?
The Problems with Redux: Are MobX and Realm going to put and end to it?
 
What Is Cucumber?
What Is Cucumber?What Is Cucumber?
What Is Cucumber?
 
Timeboxed releases - Peter Antman
Timeboxed releases - Peter AntmanTimeboxed releases - Peter Antman
Timeboxed releases - Peter Antman
 
RoboCon 2018: How did we get here? Where do we go next?
RoboCon 2018: How did we get here? Where do we go next?RoboCon 2018: How did we get here? Where do we go next?
RoboCon 2018: How did we get here? Where do we go next?
 
Developers on test
Developers on testDevelopers on test
Developers on test
 
Put "fast" back in "fast feedback"
Put "fast" back in "fast feedback"Put "fast" back in "fast feedback"
Put "fast" back in "fast feedback"
 
Automation using RobotFramework for embedded device
Automation using RobotFramework for embedded deviceAutomation using RobotFramework for embedded device
Automation using RobotFramework for embedded device
 
Php Inspections (EA Extended): The Cookbook
Php Inspections (EA Extended): The CookbookPhp Inspections (EA Extended): The Cookbook
Php Inspections (EA Extended): The Cookbook
 
Lighning Talk: PHP build process
Lighning Talk: PHP build processLighning Talk: PHP build process
Lighning Talk: PHP build process
 

Similar to Test driven development : software process

TDD
TDDTDD
Understanding TDD - theory, practice, techniques and tips.
Understanding TDD - theory, practice, techniques and tips.Understanding TDD - theory, practice, techniques and tips.
Understanding TDD - theory, practice, techniques and tips.
Malinda Kapuruge
 
Pair programming and introduction to TDD
Pair programming and introduction to TDDPair programming and introduction to TDD
Pair programming and introduction to TDD
Arati Joshi
 
Test-Driven Development.pptx
Test-Driven Development.pptxTest-Driven Development.pptx
Test-Driven Development.pptx
Tomas561914
 
Tdd and bdd
Tdd and bddTdd and bdd
Tdd and bdd
MohamedSubhiBouchi
 
TDD and Related Techniques for Non Developers (2012)
TDD and Related Techniques for Non Developers (2012)TDD and Related Techniques for Non Developers (2012)
TDD and Related Techniques for Non Developers (2012)
Peter Kofler
 
Introduction to Automated Testing
Introduction to Automated TestingIntroduction to Automated Testing
Introduction to Automated Testing
Lars Thorup
 
Introduction to-automated-testing
Introduction to-automated-testingIntroduction to-automated-testing
Introduction to-automated-testing
BestBrains
 
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
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
bhochhi
 
Test Driven Development Methodology and Philosophy
Test Driven Development Methodology and Philosophy Test Driven Development Methodology and Philosophy
Test Driven Development Methodology and Philosophy
Vijay Kumbhar
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
Md. Enamul Haque Chowdhury
 
Test Driven Development Introduction
Test Driven Development IntroductionTest Driven Development Introduction
Test Driven Development Introduction
Nguyen Hai
 
Keeping code clean
Keeping code cleanKeeping code clean
Keeping code clean
Brett Child
 
Android tdd
Android tddAndroid tdd
Android tdd
Nhan Cao
 
Prashant technical practices-tdd for xebia event
Prashant   technical practices-tdd for xebia eventPrashant   technical practices-tdd for xebia event
Prashant technical practices-tdd for xebia event
Xebia India
 
Agile Software Development Techniques for Daily Use
Agile Software Development Techniques for Daily UseAgile Software Development Techniques for Daily Use
Agile Software Development Techniques for Daily Use
Hristo Iliev
 
Build automation best practices
Build automation best practicesBuild automation best practices
Build automation best practices
Code Mastery
 
Test driven development v1.0
Test driven development v1.0Test driven development v1.0
Test driven development v1.0
Ganesh Kondal
 
Bdd - L'arte di non farsi i fatti propri
Bdd - L'arte di non farsi i fatti propriBdd - L'arte di non farsi i fatti propri
Bdd - L'arte di non farsi i fatti propri
Commit University
 

Similar to Test driven development : software process (20)

TDD
TDDTDD
TDD
 
Understanding TDD - theory, practice, techniques and tips.
Understanding TDD - theory, practice, techniques and tips.Understanding TDD - theory, practice, techniques and tips.
Understanding TDD - theory, practice, techniques and tips.
 
Pair programming and introduction to TDD
Pair programming and introduction to TDDPair programming and introduction to TDD
Pair programming and introduction to TDD
 
Test-Driven Development.pptx
Test-Driven Development.pptxTest-Driven Development.pptx
Test-Driven Development.pptx
 
Tdd and bdd
Tdd and bddTdd and bdd
Tdd and bdd
 
TDD and Related Techniques for Non Developers (2012)
TDD and Related Techniques for Non Developers (2012)TDD and Related Techniques for Non Developers (2012)
TDD and Related Techniques for Non Developers (2012)
 
Introduction to Automated Testing
Introduction to Automated TestingIntroduction to Automated Testing
Introduction to Automated Testing
 
Introduction to-automated-testing
Introduction to-automated-testingIntroduction to-automated-testing
Introduction to-automated-testing
 
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
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Test Driven Development Methodology and Philosophy
Test Driven Development Methodology and Philosophy Test Driven Development Methodology and Philosophy
Test Driven Development Methodology and Philosophy
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Test Driven Development Introduction
Test Driven Development IntroductionTest Driven Development Introduction
Test Driven Development Introduction
 
Keeping code clean
Keeping code cleanKeeping code clean
Keeping code clean
 
Android tdd
Android tddAndroid tdd
Android tdd
 
Prashant technical practices-tdd for xebia event
Prashant   technical practices-tdd for xebia eventPrashant   technical practices-tdd for xebia event
Prashant technical practices-tdd for xebia event
 
Agile Software Development Techniques for Daily Use
Agile Software Development Techniques for Daily UseAgile Software Development Techniques for Daily Use
Agile Software Development Techniques for Daily Use
 
Build automation best practices
Build automation best practicesBuild automation best practices
Build automation best practices
 
Test driven development v1.0
Test driven development v1.0Test driven development v1.0
Test driven development v1.0
 
Bdd - L'arte di non farsi i fatti propri
Bdd - L'arte di non farsi i fatti propriBdd - L'arte di non farsi i fatti propri
Bdd - L'arte di non farsi i fatti propri
 

Recently uploaded

WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
Pravash Chandra Das
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
Dinusha Kumarasiri
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
GDSC PJATK
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
Intelisync
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 

Recently uploaded (20)

WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Operating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptxOperating System Used by Users in day-to-day life.pptx
Operating System Used by Users in day-to-day life.pptx
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
Azure API Management to expose backend services securely
Azure API Management to expose backend services securelyAzure API Management to expose backend services securely
Azure API Management to expose backend services securely
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!Finale of the Year: Apply for Next One!
Finale of the Year: Apply for Next One!
 
A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024A Comprehensive Guide to DeFi Development Services in 2024
A Comprehensive Guide to DeFi Development Services in 2024
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 

Test driven development : software process

  • 2. #TODO ■ Definition of Software Development Process ■ Domain Driven Development (DDD) ■ Continuous Integration (CI) ■ Behavior Driven Development (BDD) ■ Extreme Programming (XP) – Pair programming – Standup meetings ■ Test Driven Development (TDD) ■ Hands of TDD (Live coding)
  • 3. Definition of Software Development Process ■ Dividing Project into phases ■ A.K.A Software development Life-Cycle ■ Improving – Design – Product management – Project management Planning Analysis Design Development and implement Testing Maintenance
  • 4. Domain Driven development ■ How the Application should behave ■ Consider System as Black Box ■ Common Language ■ Define User story – As a : – I want : – So That :
  • 6. Behavior Driven Development ■ TDD + DDD ■ 3 phase of TDD ■ Common language of DDD
  • 7. Extreme programming (XP) ■ TDD ■ Agile ■ DDD ■ CI
  • 8. Pair programming ■ two programmers work together at one workstation ■ The two programmers switch roles frequently. ■ 3 kind of situation – Novice & Novice (better together than solo) – Pro & Novice (mentor apprentice) – Pro & Pro (Can Also be good)
  • 9. Test Driven Development (TDD) ■ Red, Green, Refactor ■ TDD is : – define a test set for the unit first; – make the tests fail; – then implement the unit; – finally verify that the implementation of the unit makes the tests succeed. We will get to the details, Hold on!
  • 13. Levels of testing ■ Unit test : function ■ Test suit : combination of unit test ■ Component testing ■ System testing ■ Performance testing : throughput, speed, memory management, etc.
  • 14. How to test ■ #production code ■ # a unit test – Setup – Action – Assert Talk is cheap, show me the code! -Linus Trovalds
  • 15. Advantages of TDD ■ Changing becomes easy ■ Imminent feedback ■ Document what the code is doing – by writing informative names for unit tests ■ Make a Good Object Oriented Design
  • 16. Uncle Bob! ■ 3 law of TDD by uncle bob : – do not write any production code before unit test – you should not write a very complicated unit test – you should not write any more production code than is sufficient to pass the one failing unit test ■ this cycle of testing writing unit test and testing should not last longer than couple of minutes ■ every unit test should test something new and do not test something that have been tested before
  • 17. Annotations ■ Functions: – Def test_* (): ■ Class : – Class Test_* – Not having a __init__ func ■ filenames of test should start with "test_"
  • 18. Acceptance Test-Driven Development (ATDD) ■ includes customers, testers, and developers into the loop. ■ all project members understand what needs to be done ■ Advantages of Acceptance Test-Driven Development – As we have ATDD very first, so it helps to reduce defect and bug fixing effort as the project progresses. – ATDD only focus on ‘What’ and not ‘How’. – ATDD makes developers, testers, and customers to work together, this helps to understand what is required from the system
  • 19. Testing tips and tricks ■ Should be able to run frequently and fast ■ Automated testing ■ Different environments – Production – Development ■ Do not write all unit test or production at once! Follow the cycle ■ Do the simplest test case ■ do not jump into complex unit test
  • 20. Tips and tricks continued ■ Use descriptive test case names ■ Unit test is the best document for code ■ Keep your unit test to run fast ■ Keep console output minimal ■ Use code coverage tools to determine that you cover all of your codes ■ Using code analysis tools such as Pylint
  • 21. To read ■ Books – Robert martin (the uncle bob)’s clean code – Kent beck test driven development ■ Blogs – https://towardsdatascience.com/tdd-datascience-689c98492fcc – https://www.xenonstack.com/blog/machine-learning-unit-testing/
  • 22. THANK YOU FOR YOUR ATTENTION Any questions?