
How to generate a PDF test report from Cypress
How to generate a PDF test report from Cypress Cypress generates HTML test reports that only work if you have a browser open and know where to find the file. Stakeholders want PDFs — something they can open in email, print, archive, or drop into a ticket. The existing PDF plugins for Cypress either require a headless browser locally or are abandoned. There's an easier path. After your Cypress run, you have an HTML report and a folder of screenshots. Here's how to compile them into a clean, shareable PDF using the PageBolt API — no Puppeteer install required. What we're building A Cypress plugin that captures a screenshot via PageBolt whenever a test fails A post-run script that reads the screenshot folder, builds an HTML summary, and POSTs it to PageBolt's PDF endpoint A GitHub Actions step that wires it all together Setup npm install --save-dev cypress mochawesome mochawesome-merge Add your PageBolt API key as an environment variable: # .env (or GitHub Actions secret) PAGEBOLT_API_KEY
Continue reading on Dev.to JavaScript
Opens in a new tab



