DEV Community

Cover image for Root Cause: Troubleshoot Puppeteer & Playwright Tests with ease
Bnaya Peretz
Bnaya Peretz

Posted on

Root Cause: Troubleshoot Puppeteer & Playwright Tests with ease

tl;dr
Root Cause is a new open-source Node.js library, to help you visualize and troubleshoot your E2E Puppeteer & Playwright tests.
checkout our demo and integration example on GitHub

The Challenge

End-to-end tests are important, so you want a lot of them. They are also difficult and time-consuming to debug.
For example, if a test failed in headless mode, you will need to re-run it, manually save screenshots, debug step-by-step and go through console logs and network requests to understand what went wrong.
Often tests are successful on one run and fail on the next. Like that noise in your car’s engine when you take it to the mechanic—it doesn’t always reproduce. It makes it very hard to debug these tests, or for the mechanic to figure out if your car has a problem.🕵🏽‍♂️

The missing piece

While Puppeteer and Playwright are excellent browser automation libraries, we still need to do a lot by ourselves to understand what’s happening when tests don’t perform as expected.

The solution: Root Cause Open-Source 🔎

Just a simple integration and without any code change,
Root Cause will automatically detect distinct steps in your tests, capture screenshots, highlight interacted elements, collect console logs, network activity, and stack traces of errors and steps.
All of that is viewable in an intuitive and modern web-based viewer:

Root Cause Viewer
Root Cause viewer screenshot

From Jest test run to Root Cause
Root Cause test run and viewer

How to get started

Go over to our documentation site and checkout our integration examples
Visit (and ⭐️) our GitHub repository https://github.com/testimio/root-cause,
or run the demo
https://github.com/testimio/root-cause-interactive-demo/

Testim 💙 Open Source

Root Cause is an open-source project hosted on GitHub and maintained by Testim. Download, modify, and use in your environment for free.

Root Cause is evolving, your feedback and involvement are highly valuable

We have a lot of experience with end-to-end tests, but we know that to give the best user experience, you need to hear the user's voice.
And since it's open-source, you can help us make it better!

So please try it, and write to us via GitHub issue, GitHub discussion or by email: benji@testim.io, bnaya@testim.io

Top comments (0)