You've already seen cypress-mochawesome-reporter for shareable HTML reports in the CI/CD chapter. This chapter covers what that one doesn't: Allure for teams standardized on it, taking deliberate control of video and screenshot behavior instead of leaving it on defaults, and a logging strategy that actually helps when a test fails in CI.
Allure Integration
If your organization already has Allure tooling around other test suites (a shared Allure server, existing dashboards, trend tracking across builds), install the official Allure integration — published under the allure-framework GitHub org, the same team behind allure-playwright:
npm install --save-dev allure-cypress allure
Use allure-cypress, not the older, third-party @shelex/cypress-allure-plugin some guides still reference. That plugin's last release predates Cypress 16 and it crashes outright when you actually run it against a current Cypress install — verified directly: installing it, wiring it in, and running the suite reproducibly threw a runner-level TypeError that disappeared the instant the plugin was removed, with nothing else in the config changed. There's no open issue acknowledging the break and no newer release fixing it. allure-cypress is the actively maintained replacement and was verified working end-to-end against Cypress 16 — full suite green with real results generated.
// cypress.config.ts
import { defineConfig } from 'cypress'
import { allureCypress } from 'allure-cypress/reporter'
export default defineConfig({
e2e: {
baseUrl: 'https://www.saucedemo.com',
setupNodeEvents(on, config) {
allureCypress(on, config)
return config
},
},
})
// cypress/support/e2e.ts
import 'allure-cypress'
Run tests as normal, then generate the report. Use the allure package (Allure Report 3), not the older allure-commandline — that one wraps a Java CLI and fails outright with "Unable to locate a Java Runtime" on any machine without a JDK installed, a prerequisite no guide mentions until it breaks. allure is pure Node.js and needs nothing else installed:
npx cypress run
npx allure generate ./allure-results --output allure-report
npx allure open allure-report
The package also lets you attach custom labels and steps directly from test code — useful if your team categorizes failures (by feature area, by severity) inside Allure's own dashboard rather than just by spec file name. Import allure-js-commons directly in a spec, rather than a Cypress custom command:
import * as allure from 'allure-js-commons'
it('adds item to cart', () => {
allure.feature('Cart')
allure.severity('critical')
allure.step('add backpack to cart', () => {
cy.get('[data-test="add-to-cart-sauce-labs-backpack"]').click()
})
})
Taking Deliberate Control of Video and Screenshots
Cypress records video by default in run mode and takes a screenshot automatically on any failure. Both are useful defaults, but the defaults aren't free — video recording adds real time and disk usage to every CI run, whether or not anything failed:
// cypress.config.ts
export default defineConfig({
video: true, // keep for now — see the note below
videoCompression: 32, // CRF value; higher = smaller file, lower quality. Cypress default is 32.
screenshotOnRunFailure: true, // default; rarely worth turning off
trashAssetsBeforeRuns: true, // clear old videos/screenshots before each run
e2e: {
// ...
},
})
A common, deliberate optimization once a suite gets large: only keep video for failed specs, deleting passing-run video after the fact to save CI storage without losing anything useful. Cypress doesn't do this natively, but the cypress-terminal-report community pattern of deleting cypress/videos/* for specs that appear in the passed list — driven from a setupNodeEvents after:run hook — is the standard approach:
setupNodeEvents(on, config) {
on('after:run', (results) => {
if ('runs' in results) {
results.runs
.filter((run) => run.stats.failures === 0)
.forEach((run) => {
// delete run.video here via fs, if it exists
})
}
})
}
A Logging Strategy Beyond console.log
console.log inside a Cypress test writes to the browser console, which the Command Log doesn't surface directly — it's easy to lose track of. cy.log() is the Cypress-aware equivalent, and it shows up directly in the Command Log timeline alongside every other command, which matters specifically because it means a cy.log() call appears in the exact chronological position it ran, right next to the DOM snapshot from that moment:
cy.log('Starting checkout flow for standard_user')
cy.get('[data-test="checkout"]').click()
cy.log(`Cart total before discount: ${cartTotal}`)
For CI runs specifically, cypress-terminal-report is worth installing on any suite you actually debug from CI logs rather than the HTML report — it mirrors browser console output, network requests, and command logs directly into your CI's stdout, which means you can often diagnose a CI-only failure from the raw job log without downloading any artifact at all.