SlideShare a Scribd company logo
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

Similar to Testing: Do More With Less (AdvancedJS 2024) (20)

PDF
Testing: do more with less (JSNation 2024)
Eugene Fidelin
 
PDF
Testing Strategies for Node.pdf
infowindtech
 
PDF
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Applitools
 
ODP
Writing useful automated tests for the single page applications you build
Andrei Sebastian Cîmpean
 
PDF
Testing for software engineers
Mohammed Ashour
 
PDF
Testing in FrontEnd World by Nikita Galkin
Sigma Software
 
PPTX
Writing better tests for your java script app
JakeGinnivan
 
PDF
Никита Галкин "Testing in Frontend World"
Fwdays
 
PDF
Collaborating with Developers: How-to Guide for Test Engineers - By Gil Tayar
Applitools
 
PDF
Patterns and practices for building enterprise-scale HTML5 apps
Phil Leggetter
 
PDF
Unit testing (Exploring the other side as a tester)
Abhijeet Vaikar
 
PDF
Software Testing
Andrew Wang
 
PDF
Testing in Production - presentation & webinar by Amber Race
Applitools
 
PPTX
Unit testing with Jasmine
simonKenyonShepard
 
PPTX
How to write test in node.js
Jason Lin
 
PDF
Architecting for Enterprise with JavaScript
Kurtis Kemple
 
PDF
Testing Node.js.pdf
Ahmed Hassan
 
PDF
Productive JavaScript Workflow
Krzysztof Szafranek
 
PPTX
Making the Unstable Stable - An Intro To Testing
Cameron Presley
 
PPTX
How to scale your Test Automation
Klaus Salchner
 
Testing: do more with less (JSNation 2024)
Eugene Fidelin
 
Testing Strategies for Node.pdf
infowindtech
 
Testing Hourglass at Jira Frontend - by Alexey Shpakov, Sr. Developer @ Atlas...
Applitools
 
Writing useful automated tests for the single page applications you build
Andrei Sebastian Cîmpean
 
Testing for software engineers
Mohammed Ashour
 
Testing in FrontEnd World by Nikita Galkin
Sigma Software
 
Writing better tests for your java script app
JakeGinnivan
 
Никита Галкин "Testing in Frontend World"
Fwdays
 
Collaborating with Developers: How-to Guide for Test Engineers - By Gil Tayar
Applitools
 
Patterns and practices for building enterprise-scale HTML5 apps
Phil Leggetter
 
Unit testing (Exploring the other side as a tester)
Abhijeet Vaikar
 
Software Testing
Andrew Wang
 
Testing in Production - presentation & webinar by Amber Race
Applitools
 
Unit testing with Jasmine
simonKenyonShepard
 
How to write test in node.js
Jason Lin
 
Architecting for Enterprise with JavaScript
Kurtis Kemple
 
Testing Node.js.pdf
Ahmed Hassan
 
Productive JavaScript Workflow
Krzysztof Szafranek
 
Making the Unstable Stable - An Intro To Testing
Cameron Presley
 
How to scale your Test Automation
Klaus Salchner
 

More from Eugene Fidelin (13)

PDF
Marko.js - Unsung Hero of Scalable Web Frameworks (DevDays 2025)
Eugene Fidelin
 
PDF
Node.js BFFs - our way to the better/micro frontends
Eugene Fidelin
 
PDF
Housekeeping the platform at scale
Eugene Fidelin
 
PPTX
Node.js BFFs: our way to better/micro frontends
Eugene Fidelin
 
PDF
AngularJS in practice
Eugene Fidelin
 
PDF
Redis persistence in practice
Eugene Fidelin
 
PDF
Безопасность Drupal сайтов
Eugene Fidelin
 
PDF
Разработка и deploy Drupal сайтов с помощью Features.
Eugene Fidelin
 
PPT
Работа с Views в Drupal 7
Eugene Fidelin
 
PPT
Работа с полями (fields) в Drupal 7
Eugene Fidelin
 
PPT
Работа с материалами (nodes) в Drupal 7
Eugene Fidelin
 
ODP
Работа с БД в Drupal 7
Eugene Fidelin
 
PPT
Фичи н-н-нада? Или почему стоит использовать модуль Features.
Eugene Fidelin
 
Marko.js - Unsung Hero of Scalable Web Frameworks (DevDays 2025)
Eugene Fidelin
 
Node.js BFFs - our way to the better/micro frontends
Eugene Fidelin
 
Housekeeping the platform at scale
Eugene Fidelin
 
Node.js BFFs: our way to better/micro frontends
Eugene Fidelin
 
AngularJS in practice
Eugene Fidelin
 
Redis persistence in practice
Eugene Fidelin
 
Безопасность Drupal сайтов
Eugene Fidelin
 
Разработка и deploy Drupal сайтов с помощью Features.
Eugene Fidelin
 
Работа с Views в Drupal 7
Eugene Fidelin
 
Работа с полями (fields) в Drupal 7
Eugene Fidelin
 
Работа с материалами (nodes) в Drupal 7
Eugene Fidelin
 
Работа с БД в Drupal 7
Eugene Fidelin
 
Фичи н-н-нада? Или почему стоит использовать модуль Features.
Eugene Fidelin
 
Ad

Recently uploaded (20)

PPTX
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PDF
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
PDF
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
PDF
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
PDF
Add Background Images to Charts in IBM SPSS Statistics Version 31.pdf
Version 1 Analytics
 
PDF
MiniTool Power Data Recovery 8.8 With Crack New Latest 2025
bashirkhan333g
 
PDF
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
PPTX
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
PPTX
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
PDF
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
PPTX
Comprehensive Risk Assessment Module for Smarter Risk Management
EHA Soft Solutions
 
PDF
Technical-Careers-Roadmap-in-Software-Market.pdf
Hussein Ali
 
PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
PPTX
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
PPTX
Coefficient of Variance in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
PPTX
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
PPTX
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
Homogeneity of Variance Test Options IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
Empower Your Tech Vision- Why Businesses Prefer to Hire Remote Developers fro...
logixshapers59
 
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
Add Background Images to Charts in IBM SPSS Statistics Version 31.pdf
Version 1 Analytics
 
MiniTool Power Data Recovery 8.8 With Crack New Latest 2025
bashirkhan333g
 
Wondershare PDFelement Pro Crack for MacOS New Version Latest 2025
bashirkhan333g
 
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
Foundations of Marketo Engage - Powering Campaigns with Marketo Personalization
bbedford2
 
IDM Crack with Internet Download Manager 6.42 Build 43 with Patch Latest 2025
bashirkhan333g
 
Comprehensive Risk Assessment Module for Smarter Risk Management
EHA Soft Solutions
 
Technical-Careers-Roadmap-in-Software-Market.pdf
Hussein Ali
 
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
Milwaukee Marketo User Group - Summer Road Trip: Mapping and Personalizing Yo...
bbedford2
 
Coefficient of Variance in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
ChiSquare Procedure in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
Ad

Testing: Do More With Less (AdvancedJS 2024)

  • 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.fi[email protected] linkedin.com/in/eugef medium.com/@EugeneFidelin