SlideShare a Scribd company logo
1 of 13
Download to read offline
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

More Related Content

What's hot

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
 

What's hot (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
 

Similar to 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
 

Similar to 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
 

More from Eugene Fidelin

More from 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.
 

Recently uploaded

JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)
Max Lee
 

Recently uploaded (20)

Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
 
how-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdfhow-to-download-files-safely-from-the-internet.pdf
how-to-download-files-safely-from-the-internet.pdf
 
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
 
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...
 
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
 
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
 
JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)
 
AI Hackathon.pptx
AI                        Hackathon.pptxAI                        Hackathon.pptx
AI Hackathon.pptx
 
Workforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdfWorkforce Efficiency with Employee Time Tracking Software.pdf
Workforce Efficiency with Employee Time Tracking Software.pdf
 
Weeding your micro service landscape.pdf
Weeding your micro service landscape.pdfWeeding your micro service landscape.pdf
Weeding your micro service landscape.pdf
 
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
 
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdfThe Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
 
Malaysia E-Invoice digital signature docpptx
Malaysia E-Invoice digital signature docpptxMalaysia E-Invoice digital signature docpptx
Malaysia E-Invoice digital signature docpptx
 
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdfImplementing KPIs and Right Metrics for Agile Delivery Teams.pdf
Implementing KPIs and Right Metrics for Agile Delivery Teams.pdf
 
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...
 
INGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by DesignINGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by Design
 
Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024
 
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
COMPUTER AND ITS COMPONENTS PPT.by naitik sharma Class 9th A mittal internati...
 
IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024IT Software Development Resume, Vaibhav jha 2024
IT Software Development Resume, Vaibhav jha 2024
 
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product UpdatesGraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
 

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