SlideShare ist ein Scribd-Unternehmen logo
1 von 13
Downloaden Sie, um offline zu lesen
Testing:
Do More
With Less
Practical approach to test
Node.js web-apps, APIs, BFFs
Eugene Fidelin AdvancedJS Amsterdam, 7 Feb 2024
2
Is your code well-tested?
Do you feel comfortable
deploying it automatically
to production on a Friday
evening?
Does your release pipeline
stay as green as an
evergreen tree?
Why? DORA metrics
Lead Time for Changes
The amount of time it takes a
commit to get into production
Change Failure Rate
The percentage of deployments
causing a failure in production
3
Deployment Frequency
How often a team successfully
releases to production
Time to restore service
How long it takes a team to recover
from a failure in production
Static
Unit tests
Integration
tests
End to end
tests
Price Confidence Speed
Very high High Low
Low - Medium Very good High
Low Average High
Extra low Low Very high
4
How? Testing trophy
Steps to approach testing
0 2 4
1
Step 0
Enable static linters
Step 2
Write unit tests for
reusable parts and code
without coverage
Step 4
Use metrics to identify
anomalies on production
3
Step 3
Write very few e2e
tests only for the most
business critical flow(s)
Step 1
Create integration
tests for all happy and
non-happy flows
Unit tests
6
App code
Code to test
External lib/service
Test coverage
Mocks
Integration tests I
7
App code
Code to test
External lib/service
Test coverage
Mocks
Integration tests II
8
App code
Code to test
External lib/service
Test coverage
Mocks
Integration tests III
9
App code
Code to test
External lib/service
Test coverage
Mocks
End to end tests
10
App code
Code to test
External lib/service
Test coverage
Mocks
Key takeaways
11
Adopt Testing Trophy
01
Start with Integration tests
02
Reduce amount of
e2e test
03
Measure impact with
DORA metrics
04
Tools
node-mocks-http
Mock Express.js
request/response objects
superagent
Simulate incoming
request
Jest
Test framework, mock
deps, snapshots
nock
Mock downstream API
calls
12
Cypress.io
Testing in browser
CREDITS: This presentation template was
created by Slidesgo, including icons by Flaticon
and infographics & images by Freepik
Thanks!
13
Eugene Fidelin
Engineering Manager @
eugene.fidelin@gmail.com
linkedin.com/in/eugef
medium.com/@EugeneFidelin

Weitere ähnliche Inhalte

Was ist angesagt?

Bossless companies
Bossless companiesBossless companies
Bossless companies
Steven Mak
 
Evidence-Based Practice, Evidence From Key Domains: Management
Evidence-Based Practice, Evidence From Key Domains: ManagementEvidence-Based Practice, Evidence From Key Domains: Management
Evidence-Based Practice, Evidence From Key Domains: Management
Center for Evidence-Based Management
 
Cynefin - A Framework for Leaders in an Ever-Changing World
Cynefin -  A Framework for Leaders  in an Ever-Changing WorldCynefin -  A Framework for Leaders  in an Ever-Changing World
Cynefin - A Framework for Leaders in an Ever-Changing World
Ilio Krumins-Beens
 

Was ist angesagt? (20)

Systems Thinking for Product Managers
Systems Thinking  for Product ManagersSystems Thinking  for Product Managers
Systems Thinking for Product Managers
 
The ART of Value Streams: Determining Paths of Value Through Value Streams Wo...
The ART of Value Streams: Determining Paths of Value Through Value Streams Wo...The ART of Value Streams: Determining Paths of Value Through Value Streams Wo...
The ART of Value Streams: Determining Paths of Value Through Value Streams Wo...
 
Bossless companies
Bossless companiesBossless companies
Bossless companies
 
A3 Management - From Structured Problem-Solving to Workplace Development (Par...
A3 Management - From Structured Problem-Solving to Workplace Development (Par...A3 Management - From Structured Problem-Solving to Workplace Development (Par...
A3 Management - From Structured Problem-Solving to Workplace Development (Par...
 
How to measure the outcome of agile transformation
How to measure the outcome of agile transformationHow to measure the outcome of agile transformation
How to measure the outcome of agile transformation
 
The Benefits of using Systems Thinking in Project Management
The Benefits of using Systems Thinking in Project ManagementThe Benefits of using Systems Thinking in Project Management
The Benefits of using Systems Thinking in Project Management
 
Evidence-Based Practice, Evidence From Key Domains: Management
Evidence-Based Practice, Evidence From Key Domains: ManagementEvidence-Based Practice, Evidence From Key Domains: Management
Evidence-Based Practice, Evidence From Key Domains: Management
 
Lean Six Sigma White Belt Webinar
Lean Six Sigma White Belt WebinarLean Six Sigma White Belt Webinar
Lean Six Sigma White Belt Webinar
 
REA: Performance Appraisal & Workplace Performance
REA: Performance Appraisal & Workplace PerformanceREA: Performance Appraisal & Workplace Performance
REA: Performance Appraisal & Workplace Performance
 
Cynefin - A Framework for Leaders in an Ever-Changing World
Cynefin -  A Framework for Leaders  in an Ever-Changing WorldCynefin -  A Framework for Leaders  in an Ever-Changing World
Cynefin - A Framework for Leaders in an Ever-Changing World
 
Webinar: Process Improvement in Government Using Lean Six Sigma
Webinar: Process Improvement in Government Using Lean Six SigmaWebinar: Process Improvement in Government Using Lean Six Sigma
Webinar: Process Improvement in Government Using Lean Six Sigma
 
Six sigma case study-a good approach with example
Six sigma case study-a good approach with exampleSix sigma case study-a good approach with example
Six sigma case study-a good approach with example
 
Reliable and Scalable Data Ingestion at Airbnb
Reliable and Scalable Data Ingestion at AirbnbReliable and Scalable Data Ingestion at Airbnb
Reliable and Scalable Data Ingestion at Airbnb
 
TQM quiz from IRGST.org
TQM quiz from IRGST.orgTQM quiz from IRGST.org
TQM quiz from IRGST.org
 
071 Maturity Assessment
071 Maturity Assessment071 Maturity Assessment
071 Maturity Assessment
 
Bath University taster event: Evidence-Based Decision Making
Bath University taster event: Evidence-Based Decision MakingBath University taster event: Evidence-Based Decision Making
Bath University taster event: Evidence-Based Decision Making
 
Observability for Modern Applications (CON306-R1) - AWS re:Invent 2018
Observability for Modern Applications (CON306-R1) - AWS re:Invent 2018Observability for Modern Applications (CON306-R1) - AWS re:Invent 2018
Observability for Modern Applications (CON306-R1) - AWS re:Invent 2018
 
CMS dotnetnuke
CMS dotnetnukeCMS dotnetnuke
CMS dotnetnuke
 
Training material Esskay
Training material Esskay Training material Esskay
Training material Esskay
 
Balance Scorecard -.pptx
Balance Scorecard -.pptxBalance Scorecard -.pptx
Balance Scorecard -.pptx
 

Ähnlich wie Testing: Do More With Less

Curiosity Software Presents: Modelling for Continuous Testing
Curiosity Software Presents: Modelling for Continuous TestingCuriosity Software Presents: Modelling for Continuous Testing
Curiosity Software Presents: Modelling for Continuous Testing
Curiosity Software Ireland
 
Curiosity and Testery Present: Hitting the right test coverage for CI/CD
Curiosity and Testery Present: Hitting the right test coverage for CI/CDCuriosity and Testery Present: Hitting the right test coverage for CI/CD
Curiosity and Testery Present: Hitting the right test coverage for CI/CD
Curiosity Software Ireland
 
Agile Testing Pasadena JUG Aug2009
Agile Testing Pasadena JUG Aug2009Agile Testing Pasadena JUG Aug2009
Agile Testing Pasadena JUG Aug2009
Grig Gheorghiu
 

Ähnlich wie Testing: Do More With Less (20)

Curiosity Software Presents: Modelling for Continuous Testing
Curiosity Software Presents: Modelling for Continuous TestingCuriosity Software Presents: Modelling for Continuous Testing
Curiosity Software Presents: Modelling for Continuous Testing
 
Unit Testing, TDD and the Walking Skeleton
Unit Testing, TDD and the Walking SkeletonUnit Testing, TDD and the Walking Skeleton
Unit Testing, TDD and the Walking Skeleton
 
Enhancing Your Test Automation Scenario Coverage with Selenium - QA or the Hi...
Enhancing Your Test Automation Scenario Coverage with Selenium - QA or the Hi...Enhancing Your Test Automation Scenario Coverage with Selenium - QA or the Hi...
Enhancing Your Test Automation Scenario Coverage with Selenium - QA or the Hi...
 
Introduction of unit test to management
Introduction of unit test to managementIntroduction of unit test to management
Introduction of unit test to management
 
Making the Unstable Stable - An Intro To Testing
Making the Unstable Stable - An Intro To TestingMaking the Unstable Stable - An Intro To Testing
Making the Unstable Stable - An Intro To Testing
 
Agile & DevOps - It's all about project success
Agile & DevOps - It's all about project successAgile & DevOps - It's all about project success
Agile & DevOps - It's all about project success
 
Curiosity and Testery Present: Hitting the right test coverage for CI/CD
Curiosity and Testery Present: Hitting the right test coverage for CI/CDCuriosity and Testery Present: Hitting the right test coverage for CI/CD
Curiosity and Testery Present: Hitting the right test coverage for CI/CD
 
Agile Testing Pasadena JUG Aug2009
Agile Testing Pasadena JUG Aug2009Agile Testing Pasadena JUG Aug2009
Agile Testing Pasadena JUG Aug2009
 
Keeping Your Continuous Test Automation Suites Continuously Valuable in DevOps
Keeping Your Continuous Test Automation Suites Continuously Valuable in DevOpsKeeping Your Continuous Test Automation Suites Continuously Valuable in DevOps
Keeping Your Continuous Test Automation Suites Continuously Valuable in DevOps
 
Approval Tests at Agile 2012
Approval Tests at Agile 2012Approval Tests at Agile 2012
Approval Tests at Agile 2012
 
Continuous Integration - Oracle Database Objects
Continuous Integration - Oracle Database ObjectsContinuous Integration - Oracle Database Objects
Continuous Integration - Oracle Database Objects
 
Continuous integration
Continuous integration Continuous integration
Continuous integration
 
"Software Quality in the Service of Innovation in the Insurance Industry"
"Software Quality in the Service of Innovation in the Insurance Industry""Software Quality in the Service of Innovation in the Insurance Industry"
"Software Quality in the Service of Innovation in the Insurance Industry"
 
Enterprise DevOps: Scaling Build, Deploy, Test, Release
Enterprise DevOps: Scaling Build, Deploy, Test, ReleaseEnterprise DevOps: Scaling Build, Deploy, Test, Release
Enterprise DevOps: Scaling Build, Deploy, Test, Release
 
Everything You Need to Know About Regression Testing Automation.pdf
Everything You Need to Know About Regression Testing Automation.pdfEverything You Need to Know About Regression Testing Automation.pdf
Everything You Need to Know About Regression Testing Automation.pdf
 
Keeping Your Continuous Test Automation Continuously Valuable
Keeping Your Continuous Test Automation Continuously ValuableKeeping Your Continuous Test Automation Continuously Valuable
Keeping Your Continuous Test Automation Continuously Valuable
 
Test Driven Development - Overview and Adoption
Test Driven Development - Overview and AdoptionTest Driven Development - Overview and Adoption
Test Driven Development - Overview and Adoption
 
Future of QA
Future of QAFuture of QA
Future of QA
 
Futureofqa
FutureofqaFutureofqa
Futureofqa
 
Robotium
RobotiumRobotium
Robotium
 

Mehr von Eugene Fidelin

Mehr von Eugene Fidelin (12)

Node.js BFFs - our way to the better/micro frontends
Node.js BFFs - our way to the better/micro frontendsNode.js BFFs - our way to the better/micro frontends
Node.js BFFs - our way to the better/micro frontends
 
Housekeeping the platform at scale
Housekeeping the platform at scaleHousekeeping the platform at scale
Housekeeping the platform at scale
 
Node.js BFFs: our way to better/micro frontends
Node.js BFFs: our way to better/micro frontendsNode.js BFFs: our way to better/micro frontends
Node.js BFFs: our way to better/micro frontends
 
AngularJS in practice
AngularJS in practiceAngularJS in practice
AngularJS in practice
 
Redis persistence in practice
Redis persistence in practiceRedis persistence in practice
Redis persistence in practice
 
Безопасность Drupal сайтов
Безопасность Drupal сайтовБезопасность Drupal сайтов
Безопасность Drupal сайтов
 
Разработка и deploy Drupal сайтов с помощью Features.
Разработка и deploy Drupal сайтов с помощью Features.Разработка и deploy Drupal сайтов с помощью Features.
Разработка и deploy Drupal сайтов с помощью Features.
 
Работа с Views в Drupal 7
Работа с Views в Drupal 7Работа с Views в Drupal 7
Работа с Views в Drupal 7
 
Работа с полями (fields) в Drupal 7
Работа с полями (fields) в Drupal 7Работа с полями (fields) в Drupal 7
Работа с полями (fields) в Drupal 7
 
Работа с материалами (nodes) в Drupal 7
Работа с материалами (nodes) в Drupal 7Работа с материалами (nodes) в Drupal 7
Работа с материалами (nodes) в Drupal 7
 
Работа с БД в Drupal 7
Работа с БД в Drupal 7Работа с БД в Drupal 7
Работа с БД в Drupal 7
 
Фичи н-н-нада? Или почему стоит использовать модуль Features.
Фичи н-н-нада? Или почему стоит использовать модуль Features.Фичи н-н-нада? Или почему стоит использовать модуль Features.
Фичи н-н-нада? Или почему стоит использовать модуль Features.
 

Kürzlich hochgeladen

Jax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckJax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Marc Lester
 

Kürzlich hochgeladen (20)

Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024Top Mobile App Development Companies 2024
Top Mobile App Development Companies 2024
 
INGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by DesignINGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by Design
 
5 Reasons Driving Warehouse Management Systems Demand
5 Reasons Driving Warehouse Management Systems Demand5 Reasons Driving Warehouse Management Systems Demand
5 Reasons Driving Warehouse Management Systems Demand
 
The Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationThe Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test Automation
 
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
Entropy, Software Quality, and Innovation (presented at Princeton Plasma Phys...
 
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanWorkshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
 
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
Optimizing Operations by Aligning Resources with Strategic Objectives Using O...
 
OpenChain @ LF Japan Executive Briefing - May 2024
OpenChain @ LF Japan Executive Briefing - May 2024OpenChain @ LF Japan Executive Briefing - May 2024
OpenChain @ LF Japan Executive Briefing - May 2024
 
The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)
 
The Impact of PLM Software on Fashion Production
The Impact of PLM Software on Fashion ProductionThe Impact of PLM Software on Fashion Production
The Impact of PLM Software on Fashion Production
 
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
 
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCAOpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
 
Community is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea GouletCommunity is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea Goulet
 
Crafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM IntegrationCrafting the Perfect Measurement Sheet with PLM Integration
Crafting the Perfect Measurement Sheet with PLM Integration
 
How to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabberHow to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabber
 
A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdf
 
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckJax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined Deck
 
SQL Injection Introduction and Prevention
SQL Injection Introduction and PreventionSQL Injection Introduction and Prevention
SQL Injection Introduction and Prevention
 
Odoo vs Shopify: Why Odoo is Best for Ecommerce Website Builder in 2024
Odoo vs Shopify: Why Odoo is Best for Ecommerce Website Builder in 2024Odoo vs Shopify: Why Odoo is Best for Ecommerce Website Builder in 2024
Odoo vs Shopify: Why Odoo is Best for Ecommerce Website Builder in 2024
 
Microsoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdfMicrosoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdf
 

Testing: Do More With Less

  • 1. Testing: Do More With Less Practical approach to test Node.js web-apps, APIs, BFFs Eugene Fidelin AdvancedJS Amsterdam, 7 Feb 2024
  • 2. 2 Is your code well-tested? Do you feel comfortable deploying it automatically to production on a Friday evening? Does your release pipeline stay as green as an evergreen tree?
  • 3. Why? DORA metrics Lead Time for Changes The amount of time it takes a commit to get into production Change Failure Rate The percentage of deployments causing a failure in production 3 Deployment Frequency How often a team successfully releases to production Time to restore service How long it takes a team to recover from a failure in production
  • 4. Static Unit tests Integration tests End to end tests Price Confidence Speed Very high High Low Low - Medium Very good High Low Average High Extra low Low Very high 4 How? Testing trophy
  • 5. Steps to approach testing 0 2 4 1 Step 0 Enable static linters Step 2 Write unit tests for reusable parts and code without coverage Step 4 Use metrics to identify anomalies on production 3 Step 3 Write very few e2e tests only for the most business critical flow(s) Step 1 Create integration tests for all happy and non-happy flows
  • 6. Unit tests 6 App code Code to test External lib/service Test coverage Mocks
  • 7. Integration tests I 7 App code Code to test External lib/service Test coverage Mocks
  • 8. Integration tests II 8 App code Code to test External lib/service Test coverage Mocks
  • 9. Integration tests III 9 App code Code to test External lib/service Test coverage Mocks
  • 10. End to end tests 10 App code Code to test External lib/service Test coverage Mocks
  • 11. Key takeaways 11 Adopt Testing Trophy 01 Start with Integration tests 02 Reduce amount of e2e test 03 Measure impact with DORA metrics 04
  • 12. Tools node-mocks-http Mock Express.js request/response objects superagent Simulate incoming request Jest Test framework, mock deps, snapshots nock Mock downstream API calls 12 Cypress.io Testing in browser
  • 13. CREDITS: This presentation template was created by Slidesgo, including icons by Flaticon and infographics & images by Freepik Thanks! 13 Eugene Fidelin Engineering Manager @ eugene.fidelin@gmail.com linkedin.com/in/eugef medium.com/@EugeneFidelin