workshop: Node.js testing - beyond the basics

Get your ticket
Verona
English

Node.js testing - beyond the basics

Language: English

What is it about:
This 8 hours long workshop is a very deep dive into writing real-world and modern backend testing. But hey, what is modern testing? Most traditional testing guides focus on testing functions and units. In their daily routine though, developers are challenged with covering all the layers of their components - Database, APIs, MQ, metrics, 3rd parties, and more - not just logic functions. For this good reason, the 'Testing Diamond' model is getting super popular as it advocates writing tests that mitigate all the risks. This workshop is all about writing these tests in the RIGHT way. Overall, it packs 30+ best practices and 20 hands-on exercises that will open your mind to modern testing techniques. This workshop is based on Yoni's GitHub testing best practices guides (one, two, three) (✨ 85,000 stars).

🎁 Bonus 1:
Participants of this workshop will get access to Yoni's online 6 hours testing course.
🎁 Bonus 2:
Additional training Zoom gathering in June is included.

What's in there for me:

  • • The latest and greatest of backend testing in 2022
  • • Double click into the most talk-about model of recent years, the testing diamond
  • • Down to the minute details - This is not an overview rather a comprehensive code-level drill that covers 30+ best practices


Get your ticket

Teacher

Yoni Goldberg

Yoni is an independent consultant who works with 500 fortune corporates and garage startups on polishing their Node.js applications. he loves publishing ideas as an open-source project, in fact he is ranked 29th worldwide for GitHub stars. Among others, he's the author of JavaScript & Node's largest best practices collection: Node best practices and JavaScript Testing best practices. More than any other topic he is fascinated by and aims to master the art of testing. At his spare time, he likes to write in his blog and debug production application using console.log

Yoni Goldberg

Sylabus

  • Intro: Testing is changing

  • Pyramid are ancient, diamonds are forever
  • Backend testing strategy in 2022
  • Component test hello-world
  • A test anatomy of a good component test
  • The setup: Configure it for speed and great developer-experience

  • Choosing the right infrastructure for testing
  • How to optimize a DB for testing
  • When to run DB migrations
  • Configuring other pieces of infrasructure like message-queue
  • Initializing the web server and preventing port collissions
  • Dealing with data: Various database testing challenges and patterns

  • The 3 different types of test data
  • When (not) to clean the tables
  • Avoiding test collissions and race conditions
  • Testing side-effects (e.g. all records are deleted)
  • Overcoming unique columns
  • Testing dynamic values (e.g. timestamps)
  • Integrations: Testing interactions with collaborator services

  • The 5 levels of integration risks
  • The anatomy of HTTP intereptor
  • Simulating network chaos
  • Validating outgoing requests on the network level
  • Provider-driven contracts
  • Consumer-driven contracts
  • Testing the documentation validity (e.g. OpenAPI)
  • Message queues: How to test flows that starts or ends at a queue

  • The big decision: Using a real MQ or a fake one
  • Knowing when the flow has ended and the test can assert on the outcome
  • Testing message acknowledgement and 'nack-nowledgement'
  • Other typical MQ flows: Idempotency, poisoned messages and zombie process
  • MQ contract testing
  • Error handling & ops: Simulating real-world failures and verifying a great reaction

  • The common pieces of Node.js server error handler
  • Testing various failure locations like startup, promises, timers and more
  • Testing for a variety of Error types
  • Testing monitoring metrics
  • Testing for process.exit
  • Testing authentication and expiration

Prerequisite

Participants are assumed to have Node.js experience and basic unit tests knowledge. If you have no experience with testing at all, it's imperative to watch the include course 'Testing Basics' before the workshop day.

Useful information

The workshop is happening in Verona, in the same venue as the conference. Coffee breaks and lunch are included. Please note that tickets for the workshop are sold separately from the conference.

Hurry up. There are only a few available places!

Get your ticket
When

Wednesday 20th April 2022, 9:30-17:30

Language
English
Teacher

Yoni Goldberg