How can you be confident that your code is well-tested? For me, the criteria are straightforward: you feel comfortable deploying it automatically to production on a Friday evening, and the release pipeline stays as green as an evergreen tree. In this talk, I'll share some approaches that I am following to hit both targets for Node.js apps (APIs BFFs, etc)
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
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