SlideShare uma empresa Scribd logo
1 de 15
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

Mais conteúdo relacionado

Mais procurados

Testing concepts ppt
Testing concepts pptTesting concepts ppt
Testing concepts pptRathna Priya
 
Software testing
Software testingSoftware testing
Software testingthaneofife
 
Software Testing Tecniques
Software Testing TecniquesSoftware Testing Tecniques
Software Testing Tecniquesersanbilik
 
Testing Philosphies
Testing PhilosphiesTesting Philosphies
Testing PhilosphiesRob Kaufman
 
6 Weeks Industrial Training in Testing
6 Weeks Industrial Training in Testing 6 Weeks Industrial Training in Testing
6 Weeks Industrial Training in Testing Arcadian Learning
 
Learn Bug Reporting Techniques
Learn Bug Reporting TechniquesLearn Bug Reporting Techniques
Learn Bug Reporting TechniquesQA InfoTech
 
Test-Driven Development Reference Card
Test-Driven Development Reference CardTest-Driven Development Reference Card
Test-Driven Development Reference CardSeapine Software
 
Software testing strategies
Software testing strategiesSoftware testing strategies
Software testing strategiesKrishna Sujeer
 
Testing and types of Testing
Testing and types of TestingTesting and types of Testing
Testing and types of TestingMunaam Munawar
 
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...Ankit Prajapati
 
Testing on frontend
Testing on frontendTesting on frontend
Testing on frontendAfif Alfiano
 
Agile QA Automation process
Agile QA Automation processAgile QA Automation process
Agile QA Automation processTanvi Nanda
 
documentation-testing.ppt
documentation-testing.pptdocumentation-testing.ppt
documentation-testing.pptGaurav Nigam
 
Pair programming and introduction to TDD
Pair programming and introduction to TDDPair programming and introduction to TDD
Pair programming and introduction to TDDArati Joshi
 
Intro to Manual Testing
Intro to Manual TestingIntro to Manual Testing
Intro to Manual TestingAyah Soufan
 
What is objectives of software testing
What is objectives of software testingWhat is objectives of software testing
What is objectives of software testingSoftware Testing Books
 

Mais procurados (20)

Software testing ppt
Software testing pptSoftware testing ppt
Software testing ppt
 
Testing concepts ppt
Testing concepts pptTesting concepts ppt
Testing concepts ppt
 
Software testing
Software testingSoftware testing
Software testing
 
Software Testing Tecniques
Software Testing TecniquesSoftware Testing Tecniques
Software Testing Tecniques
 
Python: Design Patterns
Python: Design PatternsPython: Design Patterns
Python: Design Patterns
 
Testing Philosphies
Testing PhilosphiesTesting Philosphies
Testing Philosphies
 
6 Weeks Industrial Training in Testing
6 Weeks Industrial Training in Testing 6 Weeks Industrial Training in Testing
6 Weeks Industrial Training in Testing
 
Learn Bug Reporting Techniques
Learn Bug Reporting TechniquesLearn Bug Reporting Techniques
Learn Bug Reporting Techniques
 
Test-Driven Development Reference Card
Test-Driven Development Reference CardTest-Driven Development Reference Card
Test-Driven Development Reference Card
 
Software testing strategies
Software testing strategiesSoftware testing strategies
Software testing strategies
 
Manual testing
Manual testingManual testing
Manual testing
 
Testing and types of Testing
Testing and types of TestingTesting and types of Testing
Testing and types of Testing
 
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
 
Testing on frontend
Testing on frontendTesting on frontend
Testing on frontend
 
Agile QA Automation process
Agile QA Automation processAgile QA Automation process
Agile QA Automation process
 
documentation-testing.ppt
documentation-testing.pptdocumentation-testing.ppt
documentation-testing.ppt
 
Pair programming and introduction to TDD
Pair programming and introduction to TDDPair programming and introduction to TDD
Pair programming and introduction to TDD
 
Lesson 2
Lesson 2Lesson 2
Lesson 2
 
Intro to Manual Testing
Intro to Manual TestingIntro to Manual Testing
Intro to Manual Testing
 
What is objectives of software testing
What is objectives of software testingWhat is objectives of software testing
What is objectives of software testing
 

Destaque

Psy 652 symboyleytikh_omhlikon
Psy 652 symboyleytikh_omhlikonPsy 652 symboyleytikh_omhlikon
Psy 652 symboyleytikh_omhlikonMelina Gogou
 
δυσκολιεσ μαθησησ συμβουλευτικο κεντρο αθηνων
δυσκολιεσ μαθησησ συμβουλευτικο κεντρο αθηνωνδυσκολιεσ μαθησησ συμβουλευτικο κεντρο αθηνων
δυσκολιεσ μαθησησ συμβουλευτικο κεντρο αθηνωνMelina Gogou
 
διδακτικη του σεπ
διδακτικη του σεπδιδακτικη του σεπ
διδακτικη του σεπMelina Gogou
 
δυσκολιεσ μαθησησ συμβουλευτικο κεντρο αθηνων
δυσκολιεσ μαθησησ συμβουλευτικο κεντρο αθηνωνδυσκολιεσ μαθησησ συμβουλευτικο κεντρο αθηνων
δυσκολιεσ μαθησησ συμβουλευτικο κεντρο αθηνωνMelina Gogou
 
Educational Approaches to Emotionally and Behaviorally Disturbed Children
Educational Approaches to Emotionally and Behaviorally Disturbed ChildrenEducational Approaches to Emotionally and Behaviorally Disturbed Children
Educational Approaches to Emotionally and Behaviorally Disturbed ChildrenPamela Bianca Mas
 
συμβουλευτικη και νεεσ τεχνολογιεσ
συμβουλευτικη και νεεσ τεχνολογιεσσυμβουλευτικη και νεεσ τεχνολογιεσ
συμβουλευτικη και νεεσ τεχνολογιεσMelina Gogou
 
παρουσίαση1 1
παρουσίαση1 1παρουσίαση1 1
παρουσίαση1 1Melina Gogou
 
Risk reduction in emergency dep 1 (2)
Risk reduction in emergency dep 1 (2)Risk reduction in emergency dep 1 (2)
Risk reduction in emergency dep 1 (2)Zulfath Kamal
 

Destaque (9)

Jacket bag
Jacket bagJacket bag
Jacket bag
 
Psy 652 symboyleytikh_omhlikon
Psy 652 symboyleytikh_omhlikonPsy 652 symboyleytikh_omhlikon
Psy 652 symboyleytikh_omhlikon
 
δυσκολιεσ μαθησησ συμβουλευτικο κεντρο αθηνων
δυσκολιεσ μαθησησ συμβουλευτικο κεντρο αθηνωνδυσκολιεσ μαθησησ συμβουλευτικο κεντρο αθηνων
δυσκολιεσ μαθησησ συμβουλευτικο κεντρο αθηνων
 
διδακτικη του σεπ
διδακτικη του σεπδιδακτικη του σεπ
διδακτικη του σεπ
 
δυσκολιεσ μαθησησ συμβουλευτικο κεντρο αθηνων
δυσκολιεσ μαθησησ συμβουλευτικο κεντρο αθηνωνδυσκολιεσ μαθησησ συμβουλευτικο κεντρο αθηνων
δυσκολιεσ μαθησησ συμβουλευτικο κεντρο αθηνων
 
Educational Approaches to Emotionally and Behaviorally Disturbed Children
Educational Approaches to Emotionally and Behaviorally Disturbed ChildrenEducational Approaches to Emotionally and Behaviorally Disturbed Children
Educational Approaches to Emotionally and Behaviorally Disturbed Children
 
συμβουλευτικη και νεεσ τεχνολογιεσ
συμβουλευτικη και νεεσ τεχνολογιεσσυμβουλευτικη και νεεσ τεχνολογιεσ
συμβουλευτικη και νεεσ τεχνολογιεσ
 
παρουσίαση1 1
παρουσίαση1 1παρουσίαση1 1
παρουσίαση1 1
 
Risk reduction in emergency dep 1 (2)
Risk reduction in emergency dep 1 (2)Risk reduction in emergency dep 1 (2)
Risk reduction in emergency dep 1 (2)
 

Semelhante a Testing & continuous delivery

SE Group H.pptx
SE Group H.pptxSE Group H.pptx
SE Group H.pptxStudyvAbhi
 
Unit Testing in Angular
Unit Testing in AngularUnit Testing in Angular
Unit Testing in AngularKnoldus Inc.
 
Unit testing, UI testing and Test Driven Development in Visual Studio 2012
Unit testing, UI testing and Test Driven Development in Visual Studio 2012Unit testing, UI testing and Test Driven Development in Visual Studio 2012
Unit testing, UI testing and Test Driven Development in Visual Studio 2012Jacinto Limjap
 
Project Onion unit test environment
Project Onion unit test environmentProject Onion unit test environment
Project Onion unit test environmentAbhinav Jha
 
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
 
Technical Practices for Agile Engineering - PNSQC 2019
Technical Practices for Agile Engineering - PNSQC 2019Technical Practices for Agile Engineering - PNSQC 2019
Technical Practices for Agile Engineering - PNSQC 2019Moss Drake
 
Week 14 Unit Testing.pptx
Week 14  Unit Testing.pptxWeek 14  Unit Testing.pptx
Week 14 Unit Testing.pptxmianshafa
 
Automated Testing with Agile
Automated Testing with AgileAutomated Testing with Agile
Automated Testing with AgileKen McCorkell
 
Fundamentals of software testing
Fundamentals of software testingFundamentals of software testing
Fundamentals of software testingNoha Gamal
 
Continuous integration practices to improve the software quality
Continuous integration practices to improve the software qualityContinuous integration practices to improve the software quality
Continuous integration practices to improve the software qualityFabricio Epaminondas
 
Continuous Integration Practices
Continuous Integration Practices Continuous Integration Practices
Continuous Integration Practices Marcelo Freire
 
Agile Engineering Sparker GLASScon 2015
Agile Engineering Sparker GLASScon 2015Agile Engineering Sparker GLASScon 2015
Agile Engineering Sparker GLASScon 2015Stephen Ritchie
 
Agile A to Z Chapter 4 Feedback Loop Part 2 DevOps
Agile A to Z Chapter 4 Feedback Loop Part 2 DevOpsAgile A to Z Chapter 4 Feedback Loop Part 2 DevOps
Agile A to Z Chapter 4 Feedback Loop Part 2 DevOpsAgile ME
 
Introduzione a junit + integrazione con archibus
Introduzione a junit + integrazione con archibusIntroduzione a junit + integrazione con archibus
Introduzione a junit + integrazione con archibusDavide Fella
 

Semelhante a Testing & continuous delivery (20)

TDD Workshop UTN 2012
TDD Workshop UTN 2012TDD Workshop UTN 2012
TDD Workshop UTN 2012
 
SE Group H.pptx
SE Group H.pptxSE Group H.pptx
SE Group H.pptx
 
Unit Testing in Angular
Unit Testing in AngularUnit Testing in Angular
Unit Testing in Angular
 
Unit testing, UI testing and Test Driven Development in Visual Studio 2012
Unit testing, UI testing and Test Driven Development in Visual Studio 2012Unit testing, UI testing and Test Driven Development in Visual Studio 2012
Unit testing, UI testing and Test Driven Development in Visual Studio 2012
 
Project Onion unit test environment
Project Onion unit test environmentProject Onion unit test environment
Project Onion unit test environment
 
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)
 
Agile Testing - What is it?
Agile Testing - What is it?Agile Testing - What is it?
Agile Testing - What is it?
 
Agile Testing
Agile Testing  Agile Testing
Agile Testing
 
Technical Practices for Agile Engineering - PNSQC 2019
Technical Practices for Agile Engineering - PNSQC 2019Technical Practices for Agile Engineering - PNSQC 2019
Technical Practices for Agile Engineering - PNSQC 2019
 
Week 14 Unit Testing.pptx
Week 14  Unit Testing.pptxWeek 14  Unit Testing.pptx
Week 14 Unit Testing.pptx
 
Automated Testing with Agile
Automated Testing with AgileAutomated Testing with Agile
Automated Testing with Agile
 
Fundamentals of software testing
Fundamentals of software testingFundamentals of software testing
Fundamentals of software testing
 
Continuous integration practices to improve the software quality
Continuous integration practices to improve the software qualityContinuous integration practices to improve the software quality
Continuous integration practices to improve the software quality
 
Continuous Integration Practices
Continuous Integration Practices Continuous Integration Practices
Continuous Integration Practices
 
Testing
TestingTesting
Testing
 
Agile Engineering Sparker GLASScon 2015
Agile Engineering Sparker GLASScon 2015Agile Engineering Sparker GLASScon 2015
Agile Engineering Sparker GLASScon 2015
 
Agile A to Z Chapter 4 Feedback Loop Part 2 DevOps
Agile A to Z Chapter 4 Feedback Loop Part 2 DevOpsAgile A to Z Chapter 4 Feedback Loop Part 2 DevOps
Agile A to Z Chapter 4 Feedback Loop Part 2 DevOps
 
Unit testing (eng)
Unit testing (eng)Unit testing (eng)
Unit testing (eng)
 
SE2011_10.ppt
SE2011_10.pptSE2011_10.ppt
SE2011_10.ppt
 
Introduzione a junit + integrazione con archibus
Introduzione a junit + integrazione con archibusIntroduzione a junit + integrazione con archibus
Introduzione a junit + integrazione con archibus
 

Último

A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...BookNet Canada
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Karmanjay Verma
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 

Último (20)

A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 

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

Notas do Editor

  1. 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.
  2. In addition to the unit tests it is necessary to regularly test the whole of an application with integration tests.
  3. 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
  4. 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
  5. 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.
  6. 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.
  7. 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).