SlideShare a Scribd company logo
What can possibly go wrong if I
don’t E2E test my packages?
Juan Picado
Core Team - Verdaccio
Node.js Meetup - Berlin, 2019
Senior Front-End Engineer at eBay
@jotadeveloper
@juanpicado
● Joined Verdaccio August 2016
● I love Open Source
● I do Node.js just for fun
● I like write documentation
Objective
● Brief Introduction to Verdaccio
● Create awareness about possible mistakes on
publishing packages
● How others are doing it?
● What measures we might take in order to avoid issues
How to install Verdaccio?
A lightweight proxy and private registry for Node.js
https://bit.ly/2KMkNW8
What can possibly go wrong if i dont e2 e test my packages?
End to End Testing
End-to-end testing is a technique used to test whether the
entire application flow behaves as expected from start to
finish
https://ebaytech.berlin/100-percent-test-coverage-is-not-enough-3d733551bc3f
End to End Testing
Tests that simulate real user scenarios can easily help to
determine how a failing test would impact the user.
https://ebaytech.berlin/100-percent-test-coverage-is-not-enough-3d733551bc3f
Let’s translate this to Node.js publishing scenario
Provider
Consumer
What can possibly go wrong?
Awareness
Entry point is incorrect
Entry point is incorrect
Missing dependencies
● Flat node_modules structure issue
○ Using a sub-dependency provided by a dependency
Missing dependencies
● Dependencies removed from the registry
○ npmjs provides 72h window to remove pkgs (immutable)
○ private registries do not follow this rule (mutable)
https://github.com/ljharb
Missing dependencies
Jordan Harband
Dependencies holded by npmjs for security reasons
Missing dependencies
Packages just vanish from the public registry
Missing dependencies
Dependencies using git:// or relative locations
Missing dependencies
Other reasons
.npmignore is misconfigured
main entry point is included by default
Wrong compilation target (eg: @babel/env)
Other reasons
Excess of confidence on dependency bots
Other reasons
What other devs are doing?
@angular-cli
22k ⭐️
1,317,000 weekly downloads
@angular-cli
● Command Line Tool (scaffolds apps and libraries)
● Monorepo based on @angular-devkit
○ Similar to lerna structure
● Use yarn workspaces
● Custom build setup (no Jest or similar)
@angular-cli
@angular-cli
CircleCI - e2e-cli
@angular-cli
@angular-cli
CircleCI - e2e-cli
@angular-cli
Before was required mock dependencies as local tarballs
@angular-cli
● Special local build for E2E
● Using absolute paths for dependencies
○ No semver
○ No guarantee the local dependencies and their
transitive dependencies were used
● Unable to test the ng update command
● Some tests always tested last publish
Which issues angular cli was having?
@angular-cli
How @angular-cli solved the issue
@angular-cli
Verdaccio as devDependency
@angular-cli
Configuration
● Custom package access
● $all (any user)
● No proxy on private pkgs
@angular-cli
Verdaccio integration at @angular/cli
1. Spawn verdaccio
2. Custom build read all tests
3. Build local packages
4. Local Publish (+build) to Verdaccio (@angular/dev-kit)
5. Create a test project with ng CLI (fetching from verdaccio)
6. Run all tests in serie
@angular-cli
CircleCI - e2e-cli
@angular-cli
Spawn Verdaccio with JavaScript
@angular-cli
create-react-app
74k ⭐️
1,117,000 weekly downloads
@create-react-app
● Command Line Tool (scaffolds React apps)
● Monorepo based on Lerna
● Use yarn workspaces
● Use bash instead Javascript for E2E
@create-react-app
@create-react-app
@create-react-app
@create-react-app
● Prepare a workspace, copy, paste files
● npm link workaround
Which issues create-react-app was having?
@create-react-app
How create-react-app solved the issue
@create-react-app
Using bash to instantiate a server@create-react-app
Configuration
● Default package access
● $all (any user)
● Uplinks advanced
connections options for fetch
@create-react-app
Verdaccio integration at create-react-app
1. Bootstrap verdaccio (bash script)
2. Build all packages
3. Publish on Verdaccio with Lerna
4. Run npx create-react-app test-app
i. Build the app
ii. Run smoke tests
iii. Verify internal stuff and clean up
@create-react-app
Who else?
● CircleCI Integrated
● Use Verdaccio within a CircleCI Orbs
(https://circleci.com/orbs/)
11k ⭐️
1,041,000 weekly downloads
https://aurelia.io/
https://circleci.com/gh/aurelia/aurelia/37487
34k ⭐️
11,041,000 weekly downloads
https://babeljs.io/
34k ⭐️
11,041,000 weekly downloads
https://babeljs.io/
34k ⭐️
11,041,000 weekly downloads
https://babeljs.io/
🤓
Measures
● Intense Code Reviews (config files that affect packages)
● Publish to a local registry in each PR
● Perform a real installation
● Run smoke tests
● Ensure you are testing the user behaviour
● Rely real tooling (npm, npx, yarn, etc...)
What can possibly go wrong if I
don’t E2E test my packages?
Ship confidence
http://verdaccio.org
🤩🤩

More Related Content

What's hot (20)

PDF
SKS in git ops mode
Raphaël PINSON
 
ODP
Xdebug for Beginners
Sean Prunka
 
PPT
icebreakerwithdevops-150218112943-conversion-gate02
Manohar Kumar
 
PPTX
Angular 2 Básico
Romualdo Andre
 
PDF
How to go about testing in React?
Lisa Gagarina
 
PPTX
Resful Trinity Code One - San Francisco
Ivan Junckes Filho
 
PDF
Android clean architecture workshop 3h edition
Jorge Ortiz
 
PPTX
Bootiful Reactive Testing with Mario Gray
VMware Tanzu
 
PDF
GraalVM and MicroProfile - A Polyglot Microservices Solution
Roberto Cortez
 
ODP
Eclipse Buildship JUG Hamburg
simonscholz
 
PDF
Chasing the RESTful Trinity - Client CLI and Documentation
Roberto Cortez
 
PDF
How to เสร็จเร็ว (Use Agile for your project with team)
Jirayut Nimsaeng
 
PDF
DMCA #25: Jenkins - Docker & Android: Comment Docker peu faciliter la créatio...
Olivier Destrebecq
 
PDF
Hidden Dragons of CGO
All Things Open
 
PDF
(Js) Export your own WebGL Viewer
JooinK
 
PDF
Automated tests types on Magento 2 example
Sergii Ivashchenko
 
PDF
Angular Vienna - Use React tools for better Angular apps
Martin Hochel
 
PPTX
Develop 4 Developers
Christian Güdemann
 
PPTX
TDD with Python and App Engine
Ricardo Bánffy
 
PDF
Why You Should Start Using Docker
Alexandru Bolboaca
 
SKS in git ops mode
Raphaël PINSON
 
Xdebug for Beginners
Sean Prunka
 
icebreakerwithdevops-150218112943-conversion-gate02
Manohar Kumar
 
Angular 2 Básico
Romualdo Andre
 
How to go about testing in React?
Lisa Gagarina
 
Resful Trinity Code One - San Francisco
Ivan Junckes Filho
 
Android clean architecture workshop 3h edition
Jorge Ortiz
 
Bootiful Reactive Testing with Mario Gray
VMware Tanzu
 
GraalVM and MicroProfile - A Polyglot Microservices Solution
Roberto Cortez
 
Eclipse Buildship JUG Hamburg
simonscholz
 
Chasing the RESTful Trinity - Client CLI and Documentation
Roberto Cortez
 
How to เสร็จเร็ว (Use Agile for your project with team)
Jirayut Nimsaeng
 
DMCA #25: Jenkins - Docker & Android: Comment Docker peu faciliter la créatio...
Olivier Destrebecq
 
Hidden Dragons of CGO
All Things Open
 
(Js) Export your own WebGL Viewer
JooinK
 
Automated tests types on Magento 2 example
Sergii Ivashchenko
 
Angular Vienna - Use React tools for better Angular apps
Martin Hochel
 
Develop 4 Developers
Christian Güdemann
 
TDD with Python and App Engine
Ricardo Bánffy
 
Why You Should Start Using Docker
Alexandru Bolboaca
 

Similar to What can possibly go wrong if i dont e2 e test my packages? (20)

PPTX
Creating a reasonable project boilerplate
Stanislav Petrov
 
PDF
Code Once; Run Everywhere - A Beginner’s Journey with React Native
Hasitha Walpola
 
PDF
How fast can you onboard a new team member with VAGRANT ?
Vivek Parihar
 
ODP
RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...
dcieslak
 
PDF
Why is .Net Technology Recognised for Software Development?
LOGINPHP360
 
PPTX
Why is .Net Technology Recognised for Software Development?
LOGINPHP360
 
PDF
Passing the Joel Test in the PHP World (phpbnl10)
Lorna Mitchell
 
PDF
Use React tools for better Angular apps
Martin Hochel
 
PDF
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
mfrancis
 
PPTX
Mobile Application and Developments.pptx
GevitaChinnaiah
 
PDF
Unit Rebooted – Real World Use Cases and Success Stories
NGINX, Inc.
 
PDF
The State of the Veil Framework
VeilFramework
 
PDF
ETICS supporting compliance and interoperability, Gabriele Giammatteo, Engine...
OW2
 
PDF
Go Pro, Inc. Case Study: Dive into the details of our node.js applications
Andrew Maxwell
 
PDF
Webconf nodejs-production-architecture
Ben Lin
 
PDF
Continuous integration (eng)
Anatoliy Okhotnikov
 
PPTX
Nodejs
Vinod Kumar Marupu
 
PDF
apidays LIVE New York - Navigating the Sea of Javascript Tools to Discover Sc...
apidays
 
PDF
Odo improving the developer experience on OpenShift - hack & sangria
Jorge Morales
 
PDF
ContainerCon - Test Driven Infrastructure
Yury Tsarev
 
Creating a reasonable project boilerplate
Stanislav Petrov
 
Code Once; Run Everywhere - A Beginner’s Journey with React Native
Hasitha Walpola
 
How fast can you onboard a new team member with VAGRANT ?
Vivek Parihar
 
RandomTest - Random Software Integration Tests That Just Work for C/C++, Java...
dcieslak
 
Why is .Net Technology Recognised for Software Development?
LOGINPHP360
 
Why is .Net Technology Recognised for Software Development?
LOGINPHP360
 
Passing the Joel Test in the PHP World (phpbnl10)
Lorna Mitchell
 
Use React tools for better Angular apps
Martin Hochel
 
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
mfrancis
 
Mobile Application and Developments.pptx
GevitaChinnaiah
 
Unit Rebooted – Real World Use Cases and Success Stories
NGINX, Inc.
 
The State of the Veil Framework
VeilFramework
 
ETICS supporting compliance and interoperability, Gabriele Giammatteo, Engine...
OW2
 
Go Pro, Inc. Case Study: Dive into the details of our node.js applications
Andrew Maxwell
 
Webconf nodejs-production-architecture
Ben Lin
 
Continuous integration (eng)
Anatoliy Okhotnikov
 
apidays LIVE New York - Navigating the Sea of Javascript Tools to Discover Sc...
apidays
 
Odo improving the developer experience on OpenShift - hack & sangria
Jorge Morales
 
ContainerCon - Test Driven Infrastructure
Yury Tsarev
 
Ad

More from Juan Picado (7)

PDF
Optimizing a React application for Core Web Vitals
Juan Picado
 
PDF
Deep dive into Verdaccio - NodeTLV 2022 - Israel
Juan Picado
 
PPTX
Introduction to Verdaccio - Trivago 2019
Juan Picado
 
PDF
How to build a node.js registry with react?
Juan Picado
 
PDF
Sharing modules in modern web applications
Juan Picado
 
PDF
Introduccion Verdaccio ViennaJS
Juan Picado
 
PDF
Introduction to Verdaccio
Juan Picado
 
Optimizing a React application for Core Web Vitals
Juan Picado
 
Deep dive into Verdaccio - NodeTLV 2022 - Israel
Juan Picado
 
Introduction to Verdaccio - Trivago 2019
Juan Picado
 
How to build a node.js registry with react?
Juan Picado
 
Sharing modules in modern web applications
Juan Picado
 
Introduccion Verdaccio ViennaJS
Juan Picado
 
Introduction to Verdaccio
Juan Picado
 
Ad

Recently uploaded (17)

PPTX
The Monk and the Sadhurr and the story of how
BeshoyGirgis2
 
PPTX
Finally, My Best IPTV Provider That Understands Movie Lovers Experience IPTVG...
Rafael IPTV
 
PDF
How Much GB RAM Do You Need for Coding? 5 Powerful Reasons 8GB Is More Than E...
freeshopbudget
 
PPTX
Internet Basics for class ix. Unit I. Describe
ASHUTOSHKUMAR1131
 
PPTX
AI at Your Side: Boost Impact Without Losing the Human Touch (SXSW 2026 Meet ...
maytaldahan
 
PPTX
MSadfadsfafdadfccadradfT_Presentation.pptx
pahalaedward2
 
PPTX
Artificial-Intelligence-in-Daily-Life (2).pptx
nidhigoswami335
 
PPTX
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
PDF
UI/UX Developer Guide: Tools, Trends, and Tips for 2025
Penguin peak
 
PPTX
Birth-after-Previous-Caesarean-Birth (1).pptx
fermann1
 
DOCX
An_Operating_System by chidi kingsley wo
kingsleywokocha4
 
PDF
GEO Strategy 2025: Complete Presentation Deck for AI-Powered Customer Acquisi...
Zam Man
 
PPTX
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
PPT
1965 INDO PAK WAR which Pak will never forget.ppt
sanjaychief112
 
PDF
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
PDF
The AI Trust Gap: Consumer Attitudes to AI-Generated Content
Exploding Topics
 
PPTX
InOffensive Security_cybersecurity2.pptx
wihib17507
 
The Monk and the Sadhurr and the story of how
BeshoyGirgis2
 
Finally, My Best IPTV Provider That Understands Movie Lovers Experience IPTVG...
Rafael IPTV
 
How Much GB RAM Do You Need for Coding? 5 Powerful Reasons 8GB Is More Than E...
freeshopbudget
 
Internet Basics for class ix. Unit I. Describe
ASHUTOSHKUMAR1131
 
AI at Your Side: Boost Impact Without Losing the Human Touch (SXSW 2026 Meet ...
maytaldahan
 
MSadfadsfafdadfccadradfT_Presentation.pptx
pahalaedward2
 
Artificial-Intelligence-in-Daily-Life (2).pptx
nidhigoswami335
 
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
UI/UX Developer Guide: Tools, Trends, and Tips for 2025
Penguin peak
 
Birth-after-Previous-Caesarean-Birth (1).pptx
fermann1
 
An_Operating_System by chidi kingsley wo
kingsleywokocha4
 
GEO Strategy 2025: Complete Presentation Deck for AI-Powered Customer Acquisi...
Zam Man
 
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
1965 INDO PAK WAR which Pak will never forget.ppt
sanjaychief112
 
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
The AI Trust Gap: Consumer Attitudes to AI-Generated Content
Exploding Topics
 
InOffensive Security_cybersecurity2.pptx
wihib17507
 

What can possibly go wrong if i dont e2 e test my packages?

Editor's Notes

  • #31: Context about “Some tests always tested last publish”