SlideShare une entreprise Scribd logo
1  sur  34
BY
KATE SOGLAEVA
TYPES OF TESTS
Test Type To Confirm That:
Unit Tests
Low level functions and classes work as expected under
a variety of inputs.
Integration Tests
Integrated modules work together and in conjunction with
infrastructure such as message queues and databases.
Acceptance Tests
Your application and key user flows works as a complete
black box when driven via the user interface.
Load Tests
Your application performs well under simulated real world
user load.
Performance Tests
The application meets performance requirements and
response times under real world load scenarios.
Simulation Tests
Your application works in device simulation
environments. (This is growing in importance in the
mobile world where you need to test software on diverse
emulated mobile devices.)
Smoke Tests
Tests to validate the state and integrity of a freshly
deployed environment.
Quality Tests
Application code is high quality – identified through
techniques such as static analysis, conformance to style
guides, code coverage etc.
Impact on business
Time to fix
fewer bugs on
production
Save
money
>> Unit tests are written by
programmers to ensure that the
code does what they intend it
to do.
Uncle Bob (Robert Martin)
>> It is difficult to claim that you are Agile, if you are not
writing lots of automated test cases, and writing them
before you write the code that makes them pass.
LEGACY CODE
- Edit and Pray Cover and Modify.
TEST TYPES
11
Clas
s Clas
s
Clas
s
Clas
s
Clas
s
Clas
s Clas
s
DB
Unit
Integration
Acceptance
GOAL
- isolate each part of the program
- show that the individual parts are correct.
Clas
s Clas
s
Clas
s
Clas
s
Clas
s
Clas
s Clas
s
DB
Unit
KPI
100 % coverage != good tests
BENEFITS
UNIT TESTS
TEST COMPLEX
SCENARIOS QUICKLY
YOU ENSURE
READABILITY
YOU ENSURE
MAINTAINABILITY
FEEL SAFER
REFACTOR WITHOUT
WORRIES
SAVE TIME ON
TESTING
BONUS: KNOW EXACTLY
WHAT IS BROKEN
WRITING CLEARER
CODE
TOOLS
UNIT TESTS
TOOLS
TDD
BDD
User story
As a [Role]
I want [Feature]
So that I receive [Value]
Test scenario
Given [Context]
When [Event Occurs]
Then [Outcome]
MOCKITO
Seller seller = mock(Seller.class);
Shop shop = new Shop(seller);
public void shouldBuyBread() throws Exception {
//given
given(seller.askForBread()).willReturn(new Bread());
//when
Goods goods = shop.buyBread();
//then
assertThat(goods, containBread());
}
DEMO
UNIT TESTS
WHAT COULD BE
TESTED
Custom Business
logic
Validation Frontend
API
INTEGRATION
TLOG
Unit tests
Integration
tests
IOS MOBILE APP
Kiwi
GHUnit
OCHamcrest
OCMockito
Unit tests benefits

Contenu connexe

Tendances

Functional & Performance Test Automation with CI
Functional & Performance Test Automation with CI Functional & Performance Test Automation with CI
Functional & Performance Test Automation with CI Leonard Fingerman
 
#1 unit testing
#1 unit testing#1 unit testing
#1 unit testingeleksdev
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual Testingdidev
 
Code Review tool for personal effectiveness and waste analysis
Code Review tool for personal effectiveness and waste analysisCode Review tool for personal effectiveness and waste analysis
Code Review tool for personal effectiveness and waste analysisMikalai Alimenkou
 
Code review
Code reviewCode review
Code reviewdqpi
 
Unit testing
Unit testing Unit testing
Unit testing dubbu
 
Java Code Review Checklist
Java Code Review ChecklistJava Code Review Checklist
Java Code Review ChecklistMahesh Chopker
 
Continuous Test Automation via CI (CodeMash 2012) - Automating the Agile way
Continuous Test Automation via CI (CodeMash 2012) - Automating the Agile wayContinuous Test Automation via CI (CodeMash 2012) - Automating the Agile way
Continuous Test Automation via CI (CodeMash 2012) - Automating the Agile wayLeonard Fingerman
 
Testing JavaScript Applications
Testing JavaScript ApplicationsTesting JavaScript Applications
Testing JavaScript ApplicationsMuhammad Samu
 
Software Quality via Unit Testing
Software Quality via Unit TestingSoftware Quality via Unit Testing
Software Quality via Unit TestingShaun Abram
 
An Introduction to Unit Testing
An Introduction to Unit TestingAn Introduction to Unit Testing
An Introduction to Unit TestingSahar Nofal
 
Code review guidelines
Code review guidelinesCode review guidelines
Code review guidelinesLalit Kale
 
Introduction to Gauge
Introduction to GaugeIntroduction to Gauge
Introduction to Gaugevodqancr
 
An Introduction to Unit Testing
An Introduction to Unit TestingAn Introduction to Unit Testing
An Introduction to Unit TestingJoe Tremblay
 

Tendances (19)

Functional & Performance Test Automation with CI
Functional & Performance Test Automation with CI Functional & Performance Test Automation with CI
Functional & Performance Test Automation with CI
 
#1 unit testing
#1 unit testing#1 unit testing
#1 unit testing
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual Testing
 
Code Review tool for personal effectiveness and waste analysis
Code Review tool for personal effectiveness and waste analysisCode Review tool for personal effectiveness and waste analysis
Code Review tool for personal effectiveness and waste analysis
 
Code Review
Code ReviewCode Review
Code Review
 
Code review
Code reviewCode review
Code review
 
Unit testing
Unit testing Unit testing
Unit testing
 
Java Code Review Checklist
Java Code Review ChecklistJava Code Review Checklist
Java Code Review Checklist
 
Continuous Test Automation via CI (CodeMash 2012) - Automating the Agile way
Continuous Test Automation via CI (CodeMash 2012) - Automating the Agile wayContinuous Test Automation via CI (CodeMash 2012) - Automating the Agile way
Continuous Test Automation via CI (CodeMash 2012) - Automating the Agile way
 
Testing JavaScript Applications
Testing JavaScript ApplicationsTesting JavaScript Applications
Testing JavaScript Applications
 
JavaScript Unit Testing
JavaScript Unit TestingJavaScript Unit Testing
JavaScript Unit Testing
 
Software Quality via Unit Testing
Software Quality via Unit TestingSoftware Quality via Unit Testing
Software Quality via Unit Testing
 
Why Unit Testingl
Why Unit TestinglWhy Unit Testingl
Why Unit Testingl
 
An Introduction to Unit Testing
An Introduction to Unit TestingAn Introduction to Unit Testing
An Introduction to Unit Testing
 
Code review guidelines
Code review guidelinesCode review guidelines
Code review guidelines
 
Unit Testing Your Application
Unit Testing Your ApplicationUnit Testing Your Application
Unit Testing Your Application
 
Introduction to Gauge
Introduction to GaugeIntroduction to Gauge
Introduction to Gauge
 
SW Testing Fundamentals
SW Testing FundamentalsSW Testing Fundamentals
SW Testing Fundamentals
 
An Introduction to Unit Testing
An Introduction to Unit TestingAn Introduction to Unit Testing
An Introduction to Unit Testing
 

Similaire à Unit tests benefits

Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by ExampleNalin Goonawardana
 
Understanding Unit Testing
Understanding Unit TestingUnderstanding Unit Testing
Understanding Unit Testingikhwanhayat
 
Resumeupdated
ResumeupdatedResumeupdated
Resumeupdatedsudha A
 
Android Test Driven Development
Android Test Driven DevelopmentAndroid Test Driven Development
Android Test Driven DevelopmentArif Huda
 
Play with Testing on Android - Gilang Ramadhan (Academy Content Writer at Dic...
Play with Testing on Android - Gilang Ramadhan (Academy Content Writer at Dic...Play with Testing on Android - Gilang Ramadhan (Academy Content Writer at Dic...
Play with Testing on Android - Gilang Ramadhan (Academy Content Writer at Dic...DicodingEvent
 
Testing in a glance
Testing in a glanceTesting in a glance
Testing in a glanceRajesh Kumar
 
How to go about testing in React?
How to go about testing in React? How to go about testing in React?
How to go about testing in React? Lisa Gagarina
 
Test driven development
Test driven developmentTest driven development
Test driven developmentnamkha87
 
[AnDevCon 2016] Mutation Testing for Android
[AnDevCon 2016] Mutation Testing for Android[AnDevCon 2016] Mutation Testing for Android
[AnDevCon 2016] Mutation Testing for AndroidHazem Saleh
 
software testing technique
software testing techniquesoftware testing technique
software testing techniqueRana assad ali
 
Slides1 - testing
Slides1 - testingSlides1 - testing
Slides1 - testingJyothi Vbs
 
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 Developments are Inefficient; Behavior-Driven Developments are a ...
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...Abdelkrim Boujraf
 
Testing tools in visual studio
Testing tools in visual studioTesting tools in visual studio
Testing tools in visual studioMahdi Esmailoghli
 
Automation testing
Automation testingAutomation testing
Automation testingTomy Rhymond
 
Smart acceptance GUI tests with Selenium
Smart acceptance GUI tests with SeleniumSmart acceptance GUI tests with Selenium
Smart acceptance GUI tests with SeleniumDenys Zaiats
 
Agile Software Development in Practice - A Developer Perspective
Agile Software Development in Practice - A Developer PerspectiveAgile Software Development in Practice - A Developer Perspective
Agile Software Development in Practice - A Developer PerspectiveWee Witthawaskul
 

Similaire à Unit tests benefits (20)

Behavior Driven Development by Example
Behavior Driven Development by ExampleBehavior Driven Development by Example
Behavior Driven Development by Example
 
Understanding Unit Testing
Understanding Unit TestingUnderstanding Unit Testing
Understanding Unit Testing
 
Resumeupdated
ResumeupdatedResumeupdated
Resumeupdated
 
Android Test Driven Development
Android Test Driven DevelopmentAndroid Test Driven Development
Android Test Driven Development
 
Play with Testing on Android - Gilang Ramadhan (Academy Content Writer at Dic...
Play with Testing on Android - Gilang Ramadhan (Academy Content Writer at Dic...Play with Testing on Android - Gilang Ramadhan (Academy Content Writer at Dic...
Play with Testing on Android - Gilang Ramadhan (Academy Content Writer at Dic...
 
Testing in a glance
Testing in a glanceTesting in a glance
Testing in a glance
 
How to go about testing in React?
How to go about testing in React? How to go about testing in React?
How to go about testing in React?
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Test driven development
Test driven developmentTest driven development
Test driven development
 
[AnDevCon 2016] Mutation Testing for Android
[AnDevCon 2016] Mutation Testing for Android[AnDevCon 2016] Mutation Testing for Android
[AnDevCon 2016] Mutation Testing for Android
 
software testing technique
software testing techniquesoftware testing technique
software testing technique
 
Slides1 - testing
Slides1 - testingSlides1 - testing
Slides1 - testing
 
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 Developments are Inefficient; Behavior-Driven Developments are a ...
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
Test-Driven Developments are Inefficient; Behavior-Driven Developments are a ...
 
Testing tools in visual studio
Testing tools in visual studioTesting tools in visual studio
Testing tools in visual studio
 
Automation testing
Automation testingAutomation testing
Automation testing
 
Kasi Viswanath
Kasi ViswanathKasi Viswanath
Kasi Viswanath
 
Smart acceptance GUI tests with Selenium
Smart acceptance GUI tests with SeleniumSmart acceptance GUI tests with Selenium
Smart acceptance GUI tests with Selenium
 
Agile Software Development in Practice - A Developer Perspective
Agile Software Development in Practice - A Developer PerspectiveAgile Software Development in Practice - A Developer Perspective
Agile Software Development in Practice - A Developer Perspective
 
NidhiVasudev_Resume
NidhiVasudev_ResumeNidhiVasudev_Resume
NidhiVasudev_Resume
 

Plus de Kate Semizhon

Seven Facts about Belarus
Seven Facts about BelarusSeven Facts about Belarus
Seven Facts about BelarusKate Semizhon
 
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
 
Database Change Management
Database Change ManagementDatabase Change Management
Database Change ManagementKate Semizhon
 
Oracle ATG Commerce Overview for developers
Oracle ATG Commerce Overview for developers Oracle ATG Commerce Overview for developers
Oracle ATG Commerce Overview for developers Kate Semizhon
 
How a project is born. Intro to Discovery Phase
How a project is born. Intro to Discovery Phase How a project is born. Intro to Discovery Phase
How a project is born. Intro to Discovery Phase Kate Semizhon
 
Oracle eCommerce (ATG) Database Best Practices
Oracle eCommerce (ATG) Database  Best Practices Oracle eCommerce (ATG) Database  Best Practices
Oracle eCommerce (ATG) Database Best Practices Kate Semizhon
 
ATG Advanced Profile Management
ATG Advanced Profile ManagementATG Advanced Profile Management
ATG Advanced Profile ManagementKate Semizhon
 
SEO Instruments in ATG
SEO Instruments in ATGSEO Instruments in ATG
SEO Instruments in ATGKate Semizhon
 
Common mistakes for ATG applications that affect performance
Common mistakes for ATG applications that affect performanceCommon mistakes for ATG applications that affect performance
Common mistakes for ATG applications that affect performanceKate Semizhon
 

Plus de Kate Semizhon (17)

Cracking 1-on-1s
Cracking 1-on-1sCracking 1-on-1s
Cracking 1-on-1s
 
Serverless Pitfalls
Serverless PitfallsServerless Pitfalls
Serverless Pitfalls
 
Seven Facts about Belarus
Seven Facts about BelarusSeven Facts about Belarus
Seven Facts about Belarus
 
Git 101
Git 101Git 101
Git 101
 
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?
 
Database Change Management
Database Change ManagementDatabase Change Management
Database Change Management
 
Ecommerce in 2018
Ecommerce in 2018Ecommerce in 2018
Ecommerce in 2018
 
ATG Best Practices
ATG Best Practices ATG Best Practices
ATG Best Practices
 
Oracle ATG Commerce Overview for developers
Oracle ATG Commerce Overview for developers Oracle ATG Commerce Overview for developers
Oracle ATG Commerce Overview for developers
 
How a project is born. Intro to Discovery Phase
How a project is born. Intro to Discovery Phase How a project is born. Intro to Discovery Phase
How a project is born. Intro to Discovery Phase
 
Sonar Review
Sonar ReviewSonar Review
Sonar Review
 
Oracle eCommerce (ATG) Database Best Practices
Oracle eCommerce (ATG) Database  Best Practices Oracle eCommerce (ATG) Database  Best Practices
Oracle eCommerce (ATG) Database Best Practices
 
ATG Advanced Profile Management
ATG Advanced Profile ManagementATG Advanced Profile Management
ATG Advanced Profile Management
 
SEO Instruments in ATG
SEO Instruments in ATGSEO Instruments in ATG
SEO Instruments in ATG
 
ATG pipelines
ATG pipelinesATG pipelines
ATG pipelines
 
Common mistakes for ATG applications that affect performance
Common mistakes for ATG applications that affect performanceCommon mistakes for ATG applications that affect performance
Common mistakes for ATG applications that affect performance
 
ATG Advanced RQL
ATG Advanced RQLATG Advanced RQL
ATG Advanced RQL
 

Dernier

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
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
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
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 

Dernier (20)

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
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
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
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

Unit tests benefits

Notes de l'éditeur

  1. JUnit cartoon
  2. CI
  3. Points WHY?
  4. Who?
  5. https://sites.google.com/site/unclebobconsultingllc/tdd-with-acceptance-tests-and-unit-tests But there are two different kinds of automated tests recommended by the Agile disciplines.  Unit tests, which are written by programmers, for programmers, in a programming language. And acceptance tests, which are written by business people (and QA), for business people, in a high level specification language (like FitNesse www.fitnesse.org).
  6. Complex code with few dependencies (top left). Typically this means self-contained algorithms for business rules or for things like sorting or parsing data. This cost-benefit argument goes strongly in favour of unit testing this code, because it’s cheap to do and highly beneficial. Trivial code with many dependencies (bottom right). I’ve labelled this quadrant “coordinators”, because these code units tend to glue together and orchestrate interactions between other code units. This cost-benefit argument is in favour of not unit testing this code: it’s expensive to do and yields little practical benefit. Your time is finite; spend it more effectively elsewhere. Complex code with many dependencies (top right). This code is very expensive to write with unit tests, but too risky to write without. Usually you can sidestep this dilemma by decomposing the code into two parts: the complex logic (algorithm) and the bit that interacts with many dependencies (coordinator). Trival code with few dependencies (bottom left). We needn’t worry about this code. In cost-benefit terms, it doesn’t matter whether you unit test it or not.
  7. http://blog.typemock.com/2011/11/28/10-reasons-to-write-unit-tests Test complex scenarios quickly, without having to manually reproduce them in the application. By testing often, you don’t break the application as you go. You can’t always know the indirect implications of what you’re writing, especially if you didn’t write the original application. You ensure readability. A unit test makes the purpose of your code easier to understand. You ensure maintainability. Unit-testing forces you to better encapsulate functionality, thus making it easier to maintain and add new features. Refactor without worries. Run the tests to make sure everything still functions as intended. Save time on testing. You can test the entire application at the speed of your CPU. Feel safer. How many times were you afraid to add a new feature or change something in your application’s core? No more! Bonus: know exactly what is broken. Instead of hunting for an obscure bug, let the tests tell you what’s wrong and why. Example: the application will tell you when you add an item to a cart but the cart still appears empty. It will also tell you what item you tried to add for the cart to break.
  8. Test complex scenarios quickly, without having to manually reproduce them in the application.
  9. You ensure readability. A unit test makes the purpose of your code easier to understand.
  10. You ensure maintainability. Unit-testing forces you to better encapsulate functionality, thus making it easier to maintain and add new features.
  11. Feel safer. How many times were you afraid to add a new feature or change something in your application’s core? No more!
  12. Refactor without worries. Run the tests to make sure everything still functions as intended.
  13. Save time on testing. You can test the entire application at the speed of your CPU.
  14. Bonus: know exactly what is broken. Instead of hunting for an obscure bug, let the tests tell you what’s wrong and why. Example: the application will tell you when you add an item to a cart but the cart still appears empty. It will also tell you what item you tried to add for the cart to break.
  15. By having to Craft unit tests, developers are forced to think as consumers of their code. This gives them an extra motivation to build an application programming interface (API) that is clear, and easy to implement.
  16. Fittnesse screenshot There are differences – BDD is more “high level” dealing with specifications and was intended to be used by domain experts as well as developers  Given a customer previously bought a black sweater from me And I currently have three black sweaters left in stock When he returns the sweater for a refund Then I should have four black sweaters in stock define a test set for the unit first; then implement the unit; finally verify that the implementation of the unit makes the tests succeed.
  17. To be discussed
  18. http://iosunittesting.com/links/