SlideShare una empresa de Scribd logo
1 de 31
by
Ersan BİLİK
unit : smallest testable part of

    an application
      an individual program
    
     a function
     a procedure
     a method..
     depends on your viewpoint !
test: a means of determining the presence, quality or

    truth of something
      determining “the unit” works as it is promised to?
    
     determining the quality of “the unit” ?
     determining the truth about “the unit” ?
Unit Testing : a procedure used to validate that

    individual units of source code are working properly.
        unit testing itself, is a procedure
    
        unit testing applies to individual units
    
        unit tests build-on to source code
    
         to ensure source code is working properly
Unit testing is a white

    box approach in
    testing activity
    usually, it is

    integrated with
    implementation phase
    but also, it depends
    on your software
    development life
    cycle..
PROS                          CONS

    isolation of units            go to definition: it
                             
    refactoring code              applies to individual

                                  units, therefore it can
    simplifies integration

                                  not guaranty the overall
    documentation

                                  system will work !
    seperation of interface

    from implementation           it only shows the
                              
                                  presence of errors, not
    a good habit: motivator

    for decoupled, cohesive       absence of errors..
    code bodies, refactored
    with design patterns..
Manually..

        step by step instructional document..
    

    Automated tools

        frameworks are available..
    
        usually called xUnit frameworks..
    
we will investigate test driven development

    methodology with nUnit framework based on
    Microsoft .NET
an approach for software development


    actually, itself is not a lifecycle model, but an

    approach for implementation phase for agile
    software lifecycles..
    it is a bottom-up approach..


    think: write tests first, then code necessary

    instructions to pass your tests..
yes, first write a test case.


    then build it.. it will fail because no code

    written to pass the test
    implement your code as long as test case is

    passed..
    and voila..! YAGNI : you aint gonna need it. So,

    you code as much as you need..
    then think about it, how to do it better ?

is the code satisfies my requirements ?


    lets assume requirements sais: if a customer

    wants to transfer money, minimum balance for
    the customer should be 10.00$
    so, lets continue..

mock objects and their usage in unit testing..

Check out Behaviour

    Driven Development
    Watch video of Dave

    Astels
        ( co-author of “A
    
        practical guide to
        eXtreme
        Programming” and
        author of award
        winning test-driven
        development: a
        practical guide)
any questions or comments ?


Más contenido relacionado

La actualidad más candente

TestingAR XX - Protractor e2e Test Framework - Introduction what we have lear...
TestingAR XX - Protractor e2e Test Framework - Introduction what we have lear...TestingAR XX - Protractor e2e Test Framework - Introduction what we have lear...
TestingAR XX - Protractor e2e Test Framework - Introduction what we have lear...TestingAR Meetup
 
XPDays Ukraine: Legacy
XPDays Ukraine: LegacyXPDays Ukraine: Legacy
XPDays Ukraine: LegacyVictor_Cr
 
Implementing Quality on a Java Project
Implementing Quality on a Java ProjectImplementing Quality on a Java Project
Implementing Quality on a Java ProjectVincent Massol
 
Test driven development
Test driven developmentTest driven development
Test driven developmentlukaszkujawa
 
How to improve code quality for iOS apps?
How to improve code quality for iOS apps?How to improve code quality for iOS apps?
How to improve code quality for iOS apps?Kate Semizhon
 
Test Automatici^2 per applicazioni Web
Test Automatici^2 per applicazioni WebTest Automatici^2 per applicazioni Web
Test Automatici^2 per applicazioni WebStefano Rodighiero
 
DotNet unit testing training
DotNet unit testing trainingDotNet unit testing training
DotNet unit testing trainingTom Tang
 
Unit Testing your React / Redux app (@BucharestJS)
Unit Testing your React / Redux app (@BucharestJS)Unit Testing your React / Redux app (@BucharestJS)
Unit Testing your React / Redux app (@BucharestJS)Alin Pandichi
 
Java Beginners Meetup February 2017: Testing and TDD
Java Beginners Meetup February 2017: Testing and TDDJava Beginners Meetup February 2017: Testing and TDD
Java Beginners Meetup February 2017: Testing and TDDPatrick Kostjens
 
Software Testing Tecniques
Software Testing TecniquesSoftware Testing Tecniques
Software Testing Tecniquesersanbilik
 
Unit testing
Unit testing Unit testing
Unit testing dubbu
 
[Srijan Wednesday Webinars] Choosing the Right Testing Framework
[Srijan Wednesday Webinars] Choosing the Right Testing Framework[Srijan Wednesday Webinars] Choosing the Right Testing Framework
[Srijan Wednesday Webinars] Choosing the Right Testing FrameworkSrijan Technologies
 
Performance Testing | Instamojo
Performance Testing | InstamojoPerformance Testing | Instamojo
Performance Testing | InstamojoMohit Shukla
 
Fundamental of testing (what is testing)
Fundamental of testing (what is testing)Fundamental of testing (what is testing)
Fundamental of testing (what is testing)helfa safitri
 
Tech talks annual 2015 izzet mustafayev_performance testing - the way to make...
Tech talks annual 2015 izzet mustafayev_performance testing - the way to make...Tech talks annual 2015 izzet mustafayev_performance testing - the way to make...
Tech talks annual 2015 izzet mustafayev_performance testing - the way to make...TechTalks
 
Testing without assertions - #HUSTEF2019
Testing without assertions - #HUSTEF2019Testing without assertions - #HUSTEF2019
Testing without assertions - #HUSTEF2019SAP SE
 

La actualidad más candente (20)

TestingAR XX - Protractor e2e Test Framework - Introduction what we have lear...
TestingAR XX - Protractor e2e Test Framework - Introduction what we have lear...TestingAR XX - Protractor e2e Test Framework - Introduction what we have lear...
TestingAR XX - Protractor e2e Test Framework - Introduction what we have lear...
 
XPDays Ukraine: Legacy
XPDays Ukraine: LegacyXPDays Ukraine: Legacy
XPDays Ukraine: Legacy
 
Implementing Quality on a Java Project
Implementing Quality on a Java ProjectImplementing Quality on a Java Project
Implementing Quality on a Java Project
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
How to improve code quality for iOS apps?
How to improve code quality for iOS apps?How to improve code quality for iOS apps?
How to improve code quality for iOS apps?
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
 
Test Automatici^2 per applicazioni Web
Test Automatici^2 per applicazioni WebTest Automatici^2 per applicazioni Web
Test Automatici^2 per applicazioni Web
 
DotNet unit testing training
DotNet unit testing trainingDotNet unit testing training
DotNet unit testing training
 
Unit Testing your React / Redux app (@BucharestJS)
Unit Testing your React / Redux app (@BucharestJS)Unit Testing your React / Redux app (@BucharestJS)
Unit Testing your React / Redux app (@BucharestJS)
 
Assorted TDD tips
Assorted TDD tipsAssorted TDD tips
Assorted TDD tips
 
Java Beginners Meetup February 2017: Testing and TDD
Java Beginners Meetup February 2017: Testing and TDDJava Beginners Meetup February 2017: Testing and TDD
Java Beginners Meetup February 2017: Testing and TDD
 
Tasting Your First Test Burger
Tasting Your First Test BurgerTasting Your First Test Burger
Tasting Your First Test Burger
 
Software Testing Tecniques
Software Testing TecniquesSoftware Testing Tecniques
Software Testing Tecniques
 
Unit testing
Unit testing Unit testing
Unit testing
 
[Srijan Wednesday Webinars] Choosing the Right Testing Framework
[Srijan Wednesday Webinars] Choosing the Right Testing Framework[Srijan Wednesday Webinars] Choosing the Right Testing Framework
[Srijan Wednesday Webinars] Choosing the Right Testing Framework
 
Test link
Test linkTest link
Test link
 
Performance Testing | Instamojo
Performance Testing | InstamojoPerformance Testing | Instamojo
Performance Testing | Instamojo
 
Fundamental of testing (what is testing)
Fundamental of testing (what is testing)Fundamental of testing (what is testing)
Fundamental of testing (what is testing)
 
Tech talks annual 2015 izzet mustafayev_performance testing - the way to make...
Tech talks annual 2015 izzet mustafayev_performance testing - the way to make...Tech talks annual 2015 izzet mustafayev_performance testing - the way to make...
Tech talks annual 2015 izzet mustafayev_performance testing - the way to make...
 
Testing without assertions - #HUSTEF2019
Testing without assertions - #HUSTEF2019Testing without assertions - #HUSTEF2019
Testing without assertions - #HUSTEF2019
 

Similar a Unit Testing & Test Driven Development

Unit testing
Unit testingUnit testing
Unit testingPiXeL16
 
Developers Border Line: Unit Testing
Developers Border Line: Unit TestingDevelopers Border Line: Unit Testing
Developers Border Line: Unit TestingSikandar Ahmed
 
How we test the code analyzer
How we test the code analyzerHow we test the code analyzer
How we test the code analyzerPVS-Studio
 
Visual Studio 2015 / Visual Studio Team Services Overview
Visual Studio 2015 / Visual Studio Team Services OverviewVisual Studio 2015 / Visual Studio Team Services Overview
Visual Studio 2015 / Visual Studio Team Services OverviewHimanshu Desai
 
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in FlexassertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flexmichael.labriola
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven DevelopmentZendCon
 
Unit testing (Exploring the other side as a tester)
Unit testing (Exploring the other side as a tester)Unit testing (Exploring the other side as a tester)
Unit testing (Exploring the other side as a tester)Abhijeet Vaikar
 
How we test the code analyzer
How we test the code analyzerHow we test the code analyzer
How we test the code analyzerPVS-Studio
 
Shift left-csun-sagar-barbhaya
Shift left-csun-sagar-barbhayaShift left-csun-sagar-barbhaya
Shift left-csun-sagar-barbhayaSAGAR BARBHAYA
 
Presentations Unusual Java Bugs And Detecting Them Using Foss Tools
Presentations Unusual Java Bugs And Detecting Them Using Foss ToolsPresentations Unusual Java Bugs And Detecting Them Using Foss Tools
Presentations Unusual Java Bugs And Detecting Them Using Foss ToolsGanesh Samarthyam
 
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...Applitools
 
Testing In Software Engineering
Testing In Software EngineeringTesting In Software Engineering
Testing In Software Engineeringkiansahafi
 
CucumberSeleniumWD
CucumberSeleniumWDCucumberSeleniumWD
CucumberSeleniumWDVikas Sarin
 
Testing Sap: Modern Methodology
Testing Sap: Modern MethodologyTesting Sap: Modern Methodology
Testing Sap: Modern MethodologyEthan Jewett
 
Tutorial test driven development with Visual Studio 2012
Tutorial test driven development with Visual Studio 2012Tutorial test driven development with Visual Studio 2012
Tutorial test driven development with Visual Studio 2012Hong Le Van
 
Topic production code
Topic production codeTopic production code
Topic production codeKavi Kumar
 
Continuous integration
Continuous integrationContinuous integration
Continuous integrationBoris Dominic
 

Similar a Unit Testing & Test Driven Development (20)

Unit testing
Unit testingUnit testing
Unit testing
 
Developers Border Line: Unit Testing
Developers Border Line: Unit TestingDevelopers Border Line: Unit Testing
Developers Border Line: Unit Testing
 
How we test the code analyzer
How we test the code analyzerHow we test the code analyzer
How we test the code analyzer
 
utplsql.pdf
utplsql.pdfutplsql.pdf
utplsql.pdf
 
Visual Studio 2015 / Visual Studio Team Services Overview
Visual Studio 2015 / Visual Studio Team Services OverviewVisual Studio 2015 / Visual Studio Team Services Overview
Visual Studio 2015 / Visual Studio Team Services Overview
 
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in FlexassertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Unit testing (Exploring the other side as a tester)
Unit testing (Exploring the other side as a tester)Unit testing (Exploring the other side as a tester)
Unit testing (Exploring the other side as a tester)
 
TDD Workshop UTN 2012
TDD Workshop UTN 2012TDD Workshop UTN 2012
TDD Workshop UTN 2012
 
How we test the code analyzer
How we test the code analyzerHow we test the code analyzer
How we test the code analyzer
 
Shift left-csun-sagar-barbhaya
Shift left-csun-sagar-barbhayaShift left-csun-sagar-barbhaya
Shift left-csun-sagar-barbhaya
 
Productive JavaScript Workflow
Productive JavaScript WorkflowProductive JavaScript Workflow
Productive JavaScript Workflow
 
Presentations Unusual Java Bugs And Detecting Them Using Foss Tools
Presentations Unusual Java Bugs And Detecting Them Using Foss ToolsPresentations Unusual Java Bugs And Detecting Them Using Foss Tools
Presentations Unusual Java Bugs And Detecting Them Using Foss Tools
 
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
 
Testing In Software Engineering
Testing In Software EngineeringTesting In Software Engineering
Testing In Software Engineering
 
CucumberSeleniumWD
CucumberSeleniumWDCucumberSeleniumWD
CucumberSeleniumWD
 
Testing Sap: Modern Methodology
Testing Sap: Modern MethodologyTesting Sap: Modern Methodology
Testing Sap: Modern Methodology
 
Tutorial test driven development with Visual Studio 2012
Tutorial test driven development with Visual Studio 2012Tutorial test driven development with Visual Studio 2012
Tutorial test driven development with Visual Studio 2012
 
Topic production code
Topic production codeTopic production code
Topic production code
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 

Último

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
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
 

Último (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
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
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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
 

Unit Testing & Test Driven Development

  • 2. unit : smallest testable part of  an application an individual program   a function  a procedure  a method..  depends on your viewpoint !
  • 3. test: a means of determining the presence, quality or  truth of something determining “the unit” works as it is promised to?   determining the quality of “the unit” ?  determining the truth about “the unit” ?
  • 4. Unit Testing : a procedure used to validate that  individual units of source code are working properly. unit testing itself, is a procedure  unit testing applies to individual units  unit tests build-on to source code   to ensure source code is working properly
  • 5. Unit testing is a white  box approach in testing activity usually, it is  integrated with implementation phase but also, it depends on your software development life cycle..
  • 6. PROS CONS isolation of units go to definition: it   refactoring code applies to individual  units, therefore it can simplifies integration  not guaranty the overall documentation  system will work ! seperation of interface  from implementation it only shows the  presence of errors, not a good habit: motivator  for decoupled, cohesive absence of errors.. code bodies, refactored with design patterns..
  • 7. Manually..  step by step instructional document..  Automated tools  frameworks are available..  usually called xUnit frameworks.. 
  • 8. we will investigate test driven development  methodology with nUnit framework based on Microsoft .NET
  • 9. an approach for software development  actually, itself is not a lifecycle model, but an  approach for implementation phase for agile software lifecycles.. it is a bottom-up approach..  think: write tests first, then code necessary  instructions to pass your tests..
  • 10. yes, first write a test case.  then build it.. it will fail because no code  written to pass the test implement your code as long as test case is  passed.. and voila..! YAGNI : you aint gonna need it. So,  you code as much as you need.. then think about it, how to do it better ? 
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16. is the code satisfies my requirements ?  lets assume requirements sais: if a customer  wants to transfer money, minimum balance for the customer should be 10.00$ so, lets continue.. 
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29. mock objects and their usage in unit testing.. 
  • 30. Check out Behaviour  Driven Development Watch video of Dave  Astels ( co-author of “A  practical guide to eXtreme Programming” and author of award winning test-driven development: a practical guide)
  • 31. any questions or comments ? 