For a long time, I wondered how to test Next.js applications that talk to HTTP APIs (e.g., microservices) more effectively. How can I test the whole application in isolation without mocking the requests to the microservices? I was at a loss until I discovered Contract Testing with Specmatic.
In this talk, I'll share what I found out. After the talk, you'll know:
Why mocking network requests is problematic
How to test traditional monolithic applications using database seeding
How to utilize contract testing to test microservices-powered applications
We'll learn the basics of OpenAPI specifications, contract testing with Specmatic, and how to use these tools to run a stub server to test Next.js, Nuxt, or Remix applications. We'll write tests with Playwright without mocking any requests between the frontend and backend parts of our application.
No mocking means we can have 100% confidence that our application will work as expected while avoiding expensive E2E tests, thanks to contract testing methodologies.
Markus is a Web Developer for 15 years. Currently working on modernizing Austria's digital tax services. He is an expert working with Vue.js and Nuxt, React and Next.js, and TDD enthusiast....