u/yonatannnin r/node • Recommends
Beyond unit test: 5 advanced node.js testing techniques
#property-basedtesting#pact#consumer-drivencontracts
262 subscribers • 1 video on Hallway
Advanced. Deep dive for people who know the field.
10K views7 years ago1 recommendation
Tools and practiceWeb developmentTestingNode.js, Deno and Bun
Yoni Goldberg discusses the limitations of the traditional testing pyramid and demonstrates five advanced testing techniques for Node.js.
We're going to discuss why the mainstream nodejs & Javascript testing techniques (The testing pyramid - unit, integration, e2e with Mocha & Chai) might fall short sometime and present 5 modern and useful alternatives. Why is this important? The vast majority of node.js testing tutorials deal only with unit or integration tests. While this is aligned with common best practices (e.g. the traditional testing pyramid), new voices doubt whether those are the right match for many projects, mostly because of their complexity and low ROI. As a result, new testing techniques emerge and provide an attractive alternative. In this session, we will discuss how to choose the right testing strategy for a project and demonstrate a handful of modern and fascinating techniques like property-based testing, consumer driven contacts (pact), component testing and more. Code examples using Node.js and discussed in the real of a Microservice environment. Important pre-requisites: We're going to compare some advanced (and neat) testing tools with the basics - it's recommended that you will make yourself familiar with the fundamentals of software testing: unit test, integration test, test-driven-development and the testing pyramid. Here are some suggested tutorials: - martinfowler.com/bliki/TestPyramid.html - codeburst.io/javascript-unit-testing-using-mocha-and-chai-1d… - medium.freecodecamp.org/test-driven-development-what-it-is-a… By Yoni Goldberg Yoni is an independent Node.js architect consultant who works with customers in USA and Israel. Among his hobbies are writing about Node.js best practices in his blog and debugging node application using console.log. Read more about Yoni here: www.goldbergyoni.comWhat people say. Recommended as an excellent guide to modern testing strategies beyond basic unit and integration tests.
u/yonatannnin r/node • Recommends