SlideShare a Scribd company logo
Introduction to good practices in
software development
Testing &
Continuous Delivery 101
Nelson Melina
What is Unit Testing ?
● An Unit is smallest testable part of source
code.
● It Can be an entire interface or just a method
(OOP).
● Unit Testing isolates parts of a software and
verify that each parts behave as intended.
What are the benefits of Unit Testing
?
● You will find potential problems at the earliest
time possible.
● You can refactor code without the fear or
regression issues.
● The tests serve as a design documentation
of how a unit is supposed to work.
What are the limits of Unit Testing ?
● They only show the presence or absence of
particular errors
● For every line of code written, programmers
often need 3 to 5 lines of test code.
● Nondeterministic and multiple threads
algorithms can not be easily tested.
● Rigorous discipline is needed throughout the
software development process.
What are the most common tools of
Unit Testing ?
● JUnit (framework)
● DBUnit (extension of JUnit)
● Mock objects frameworks
Mock Objects
● They are simulated objects that mimic the behavior of
real objects in controlled ways
● We need to use them when an object :
– returns non-deterministic results.
– has states that are difficult to reproduce (e.g., a network
error).
– is slow (e.g., a database).
– does not yet exist or may change behavior.
– would have to include information or methods only for
testing.
What is Integration Testing ?
● Occurs after Unit Testing and before
validation testing.
● Combination of individual software modules
that will be tested as a group.
The next step towards complete
efficiency is Continuous Integration
Repository
Unit tests A
Code A
Code B
Code C
Unit tests B
Unit tests C
Unit Tests A, B, C
& Integration Tests
(A + B + C)
Module A (Wallet)
Module B (Widget)
Module C (MAV)
Feedbacks (Alerts,
Information, Errors or
Statuses) via email to
whom is concerned.
Continuous Integration Server
(Hudson)
Is the aggregate
behaving well ?
Here are the key principles of CI
● Maintain a code repository.
●
Automate the build.
●
Make the build self-testing.
●
Everyone commits every day.
● Every commit should be built.
●
Keep the build fast.
●
Test in a clone of the production environment.
●
Make it easy to get the latest deliverables.
● Everyone can see the results of the latest build.
●
Automate deployment.
Advantages of Continuous
Integration
● When unit tests fail, developers can revert to a bug
free state.
● Integration problems and problematic changes are
continuously detected and fixed.
● Immediate feedback to developers.
● Frequent code commits pushes developers to create
modular and less complex code.
● Metrics generated from automated testing and CI.
The final goal is to achieve
Continuous Delivery
What is Continuous Delivery ?
Why would we change our way of
working ?
● Reduce current and future costs
– Without an automated process, developers lose a great amount
of time testing manually the features they program.
– The latter we find a bug, the more expensive it is to fix.
*
● Reduce risks
– It is impossible to guaranty that all manually executed test will
always be thorough and accurate.
Go further
● http://www.citconf.com/
● http://www.martinfowler.com/articles/continuousIntegration.html
● http://confluence.public.thoughtworks.org/display/CC/CI+Feature+Matrix
● http://www.thoughtworks.com/continuous-delivery
● http://www.thoughtworks-studios.com/content/introduction-continuous-delivery
● http://stackoverflow.com
● http://continuousdelivery.com/
● http://www.thoughtworks-studios.com/content/introduction-continuous-delivery
● http://programmers.stackexchange.com/questions/140156/is-unit-testing-or-test-driven-d
● http://elegantcode.com/2012/01/06/you-are-responsible-for-making-that-feature-work-wr
● http://www.scrumalliance.org/articles/486-unit-testing-ignored-and-
misunderstood

More Related Content

What's hot (20)

PPTX
Software testing ppt
Heritage Institute Of Tech,India
 
PPT
Testing concepts ppt
Rathna Priya
 
PPT
Software testing
thaneofife
 
PPT
Software Testing Tecniques
ersanbilik
 
PPTX
Python: Design Patterns
Damian T. Gordon
 
ODP
Testing Philosphies
Rob Kaufman
 
PPT
6 Weeks Industrial Training in Testing
Arcadian Learning
 
PDF
Learn Bug Reporting Techniques
QA InfoTech
 
PDF
Test-Driven Development Reference Card
Seapine Software
 
PPT
Software testing strategies
Krishna Sujeer
 
PPSX
Manual testing
vigneshasromio
 
PPTX
Testing and types of Testing
Munaam Munawar
 
PPTX
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Ankit Prajapati
 
PDF
Testing on frontend
Afif Alfiano
 
PDF
Agile QA Automation process
Tanvi Nanda
 
PPT
documentation-testing.ppt
Gaurav Nigam
 
PPTX
Pair programming and introduction to TDD
Arati Joshi
 
PPTX
Lesson 2
Dr. Rupinder Singh
 
PPTX
Intro to Manual Testing
Ayah Soufan
 
PDF
What is objectives of software testing
Software Testing Books
 
Software testing ppt
Heritage Institute Of Tech,India
 
Testing concepts ppt
Rathna Priya
 
Software testing
thaneofife
 
Software Testing Tecniques
ersanbilik
 
Python: Design Patterns
Damian T. Gordon
 
Testing Philosphies
Rob Kaufman
 
6 Weeks Industrial Training in Testing
Arcadian Learning
 
Learn Bug Reporting Techniques
QA InfoTech
 
Test-Driven Development Reference Card
Seapine Software
 
Software testing strategies
Krishna Sujeer
 
Manual testing
vigneshasromio
 
Testing and types of Testing
Munaam Munawar
 
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Ankit Prajapati
 
Testing on frontend
Afif Alfiano
 
Agile QA Automation process
Tanvi Nanda
 
documentation-testing.ppt
Gaurav Nigam
 
Pair programming and introduction to TDD
Arati Joshi
 
Intro to Manual Testing
Ayah Soufan
 
What is objectives of software testing
Software Testing Books
 

Viewers also liked (9)

PPT
Jacket bag
Kenneth Kiang
 
PDF
Psy 652 symboyleytikh_omhlikon
Melina Gogou
 
ODP
δυσκολιεσ μαθησησ συμβουλευτικο κεντρο αθηνων
Melina Gogou
 
ODP
διδακτικη του σεπ
Melina Gogou
 
ODP
δυσκολιεσ μαθησησ συμβουλευτικο κεντρο αθηνων
Melina Gogou
 
PPTX
Educational Approaches to Emotionally and Behaviorally Disturbed Children
Pamela Bianca Mas
 
ODP
συμβουλευτικη και νεεσ τεχνολογιεσ
Melina Gogou
 
PDF
παρουσίαση1 1
Melina Gogou
 
PPTX
Risk reduction in emergency dep 1 (2)
Zulfath Kamal
 
Jacket bag
Kenneth Kiang
 
Psy 652 symboyleytikh_omhlikon
Melina Gogou
 
δυσκολιεσ μαθησησ συμβουλευτικο κεντρο αθηνων
Melina Gogou
 
διδακτικη του σεπ
Melina Gogou
 
δυσκολιεσ μαθησησ συμβουλευτικο κεντρο αθηνων
Melina Gogou
 
Educational Approaches to Emotionally and Behaviorally Disturbed Children
Pamela Bianca Mas
 
συμβουλευτικη και νεεσ τεχνολογιεσ
Melina Gogou
 
παρουσίαση1 1
Melina Gogou
 
Risk reduction in emergency dep 1 (2)
Zulfath Kamal
 
Ad

Similar to Testing & continuous delivery (20)

PPTX
Concepts of unit testing_dynamic-testing.ppt.pptx
ssuser9d6aac
 
PPTX
Concepts of unit testing_dynamic-testing.ppt.pptx
ssuser9d6aac
 
PDF
TDD Workshop UTN 2012
Facundo Farias
 
PPTX
SE Group H.pptx
StudyvAbhi
 
PDF
Unit Testing in Angular
Knoldus Inc.
 
PPTX
Unit testing, UI testing and Test Driven Development in Visual Studio 2012
Jacinto Limjap
 
PPTX
Project Onion unit test environment
Abhinav Jha
 
PDF
Unit testing (Exploring the other side as a tester)
Abhijeet Vaikar
 
PDF
Agile Testing - What is it?
Intelliware Development Inc.
 
PDF
Agile Testing
Intelliware Development Inc.
 
PPTX
Technical Practices for Agile Engineering - PNSQC 2019
Moss Drake
 
PPTX
Week 14 Unit Testing.pptx
mianshafa
 
PPT
Automated Testing with Agile
Ken McCorkell
 
PDF
Fundamentals of software testing
Noha Gamal
 
PDF
Continuous integration practices to improve the software quality
Fabricio Epaminondas
 
PDF
Continuous Integration Practices
Marcelo Freire
 
PPTX
Testing
Såñà Hàssàñ
 
PPTX
Agile Engineering Sparker GLASScon 2015
Stephen Ritchie
 
PDF
Agile A to Z Chapter 4 Feedback Loop Part 2 DevOps
Agile ME
 
PDF
Unit testing (eng)
Anatoliy Okhotnikov
 
Concepts of unit testing_dynamic-testing.ppt.pptx
ssuser9d6aac
 
Concepts of unit testing_dynamic-testing.ppt.pptx
ssuser9d6aac
 
TDD Workshop UTN 2012
Facundo Farias
 
SE Group H.pptx
StudyvAbhi
 
Unit Testing in Angular
Knoldus Inc.
 
Unit testing, UI testing and Test Driven Development in Visual Studio 2012
Jacinto Limjap
 
Project Onion unit test environment
Abhinav Jha
 
Unit testing (Exploring the other side as a tester)
Abhijeet Vaikar
 
Agile Testing - What is it?
Intelliware Development Inc.
 
Technical Practices for Agile Engineering - PNSQC 2019
Moss Drake
 
Week 14 Unit Testing.pptx
mianshafa
 
Automated Testing with Agile
Ken McCorkell
 
Fundamentals of software testing
Noha Gamal
 
Continuous integration practices to improve the software quality
Fabricio Epaminondas
 
Continuous Integration Practices
Marcelo Freire
 
Agile Engineering Sparker GLASScon 2015
Stephen Ritchie
 
Agile A to Z Chapter 4 Feedback Loop Part 2 DevOps
Agile ME
 
Unit testing (eng)
Anatoliy Okhotnikov
 
Ad

Recently uploaded (20)

PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
Mastering Financial Management in Direct Selling
Epixel MLM Software
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 

Testing & continuous delivery

  • 1. Introduction to good practices in software development Testing & Continuous Delivery 101 Nelson Melina
  • 2. What is Unit Testing ? ● An Unit is smallest testable part of source code. ● It Can be an entire interface or just a method (OOP). ● Unit Testing isolates parts of a software and verify that each parts behave as intended.
  • 3. What are the benefits of Unit Testing ? ● You will find potential problems at the earliest time possible. ● You can refactor code without the fear or regression issues. ● The tests serve as a design documentation of how a unit is supposed to work.
  • 4. What are the limits of Unit Testing ? ● They only show the presence or absence of particular errors ● For every line of code written, programmers often need 3 to 5 lines of test code. ● Nondeterministic and multiple threads algorithms can not be easily tested. ● Rigorous discipline is needed throughout the software development process.
  • 5. What are the most common tools of Unit Testing ? ● JUnit (framework) ● DBUnit (extension of JUnit) ● Mock objects frameworks
  • 6. Mock Objects ● They are simulated objects that mimic the behavior of real objects in controlled ways ● We need to use them when an object : – returns non-deterministic results. – has states that are difficult to reproduce (e.g., a network error). – is slow (e.g., a database). – does not yet exist or may change behavior. – would have to include information or methods only for testing.
  • 7. What is Integration Testing ? ● Occurs after Unit Testing and before validation testing. ● Combination of individual software modules that will be tested as a group.
  • 8. The next step towards complete efficiency is Continuous Integration
  • 9. Repository Unit tests A Code A Code B Code C Unit tests B Unit tests C Unit Tests A, B, C & Integration Tests (A + B + C) Module A (Wallet) Module B (Widget) Module C (MAV) Feedbacks (Alerts, Information, Errors or Statuses) via email to whom is concerned. Continuous Integration Server (Hudson) Is the aggregate behaving well ?
  • 10. Here are the key principles of CI ● Maintain a code repository. ● Automate the build. ● Make the build self-testing. ● Everyone commits every day. ● Every commit should be built. ● Keep the build fast. ● Test in a clone of the production environment. ● Make it easy to get the latest deliverables. ● Everyone can see the results of the latest build. ● Automate deployment.
  • 11. Advantages of Continuous Integration ● When unit tests fail, developers can revert to a bug free state. ● Integration problems and problematic changes are continuously detected and fixed. ● Immediate feedback to developers. ● Frequent code commits pushes developers to create modular and less complex code. ● Metrics generated from automated testing and CI.
  • 12. The final goal is to achieve Continuous Delivery
  • 13. What is Continuous Delivery ?
  • 14. Why would we change our way of working ? ● Reduce current and future costs – Without an automated process, developers lose a great amount of time testing manually the features they program. – The latter we find a bug, the more expensive it is to fix. * ● Reduce risks – It is impossible to guaranty that all manually executed test will always be thorough and accurate.
  • 15. Go further ● http://www.citconf.com/ ● http://www.martinfowler.com/articles/continuousIntegration.html ● http://confluence.public.thoughtworks.org/display/CC/CI+Feature+Matrix ● http://www.thoughtworks.com/continuous-delivery ● http://www.thoughtworks-studios.com/content/introduction-continuous-delivery ● http://stackoverflow.com ● http://continuousdelivery.com/ ● http://www.thoughtworks-studios.com/content/introduction-continuous-delivery ● http://programmers.stackexchange.com/questions/140156/is-unit-testing-or-test-driven-d ● http://elegantcode.com/2012/01/06/you-are-responsible-for-making-that-feature-work-wr ● http://www.scrumalliance.org/articles/486-unit-testing-ignored-and- misunderstood

Editor's Notes

  • #5: Achieving a 100% code coverage isn't necessarily the victory objective here, for two reasons, first testing one case of each methods does not permit us to say that we are potentially bug free. At the same time, testing all cases of a method can be quite time consuming, rendering the tests too expensive for the company. So what we need to do is fine the right amount or amounts (depending on the project) of tests that we need to improve our quality of work while staying cost-efficient.
  • #8: In addition to the unit tests it is necessary to regularly test the whole of an application with integration tests.
  • #10: To do this, there are specialized products of continuous integration which will : retrieve the source code of a component which was just commited on a repository recompile that source code relaunch unit tests package the compile code of the component in an archive deploye it on a specific test environment launch integration tests of the aggregate of the components pass on messages and statistics to the developer concerned (and other people indicated in settings) generate and stock a new version of the whole application if the tests went well. Most of the continuous integration environments use MAVEN or ANT as fundamental technologies
  • #12: Examples of Metrics : - Test Code coverage - Successful Build Rate - Build Repair Rate (It indicates the time taken to repair a failed build) - % of code duplicated - Lint checks - Coding standards violations - Build compilation time - Cyclic Complexity Number (CCN measures how many paths there are through a particular piece of code) - Dead code
  • #13: What we want to achieve with Continuous Delivery is, as soon as some code is ready, to automatically put it through Unit Tests then integration and acceptance tests, so that at any moment we want to, we can deploy to production and issue a release of the application.
  • #14: As we see it on this UML diagram, the key is to implement in our workflow an automated loop that causes us to correct our code the sooner possible until it is ready to put directly to production, thus increasing our speed to produce a qualitative product to our customers.
  • #15: Now we spend a lot of time testing manually after programming a feature, which cost the company money, and demotivate the developers. There is another factor that arise with this method of working, the risk, because as humans we can not guaranty that the tests will always be 100% thorough and accurate. Risks of what exactly ? Imagine a case where we discover one bug at the last stages of the process, it'll surely be much more complicated to fix than at the moment it was introduced. What we need is to speed up the whole process while improving the quality, and I believe we can do it with the concepts I introduced to you today. * Study made in 2002 by the National Institute of Standards and Technology (NIST).