On this page4 sections
ReferenceBeginner3-5 min reference

Test Artifacts

When a CI test fails, the artifacts are the only way to debug it after the fact — the machine is gone. This sheet lists the artifacts worth producing, what each tells you, and sensible retention. It pairs with Flaky Test Debugging and HAR File Analysis (linked below).

The artifacts

ArtifactTells youProduced by
JUnit/XML reportPass/fail per test, trendsMost runners
ScreenshotUI state at failureOn-failure hook
VideoThe run leading to failureCypress/Playwright
TraceStep-by-step DOM/network/console timelinePlaywright trace
Console / browser logJS errors, warningsRunner
Server logBackend errors with timestampsApp/CI
HARFull network captureDevTools / proxy
Coverage reportWhat code the tests exercisedCoverage tool
HTML reportHuman-readable summaryAllure / runner

Retention guidance

ArtifactKeep
Test reports (XML/HTML)Long — trend analysis
Screenshots / video / traceOn failure; short TTL on pass (storage)
LogsDays–weeks per policy
CoveragePer build; trend the %

Tips

  • Capture screenshot + trace on failure — the trace usually solves it alone.
  • Name artifacts with the test + timestamp + run id so they're findable.
  • Don't archive everything on every green run — it balloons storage.
  • Make artifacts downloadable from the CI run page, not buried on an agent.

Common mistakes

  • No on-failure capture, so CI failures can't be reproduced.
  • Publishing reports only on success.
  • Keeping full video/trace for every passing run (cost).
  • Artifacts with no run/test id — impossible to correlate.

// Related resources