Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk6 min

How to Save Baseline Screenshots as CI Artifacts for Visual Testing

Save visual-test evidence after CI runs by uploading the configured screenshot, diff, and report paths. Learn GitHub Actions and GitLab examples, retention choices, and troubleshooting.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To preserve visual-test evidence after a CI run, save the test output to known paths and configure your CI provider to upload those paths as artifacts. Upload actual screenshots, diffs, reports, or traces—not an assumed directory—and choose whether to retain them on successful runs, failed runs, or both. Artifacts preserve files for review; they do not automatically update the approved baseline.

Separate approved baselines from each run’s evidence

A baseline is the approved reference image used for comparison. A run artifact is output produced while tests execute: for example, the actual screenshot, a visual diff, a test report, or a trace. Keep those roles distinct. When a comparison fails, the actual image and diff help explain the mismatch; replacing the reference automatically would remove the review step that keeps the baseline trustworthy.

As an Amazon Associate I earn from qualifying purchases.

With Playwright, toHaveScreenshot() performs screenshot comparison, and its documentation describes how snapshots are generated and located in the test workflow. Configure your project deliberately so approved snapshots and per-run diagnostics have identifiable paths. See Playwright visual comparisons.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set up the CI artifact flow

  1. Choose the files to preserve. Identify the configured paths for reference snapshots, actual screenshots, diffs, traces, test results, and HTML reports. Upload only the outputs useful to your review process.
  2. Run comparisons in a consistent environment. Use the same browser and operating-system environment that produced the approved baselines as closely as practical. Playwright recommends using the same environment for consistent screenshots; changes in rendering inputs can create differences unrelated to the application. See Playwright visual comparisons.
  3. Run the visual tests before uploading. The upload step should run after the test command, including when the command reports failures if you need diagnostics.
  4. Upload the configured output paths. Confirm the artifact contains the expected files. A provider’s example report directory is not necessarily where your screenshots are written.
  5. Choose retention and access. Decide how long the evidence is useful, who should be able to retrieve it, and whether screenshots or reports reveal sensitive information.

GitHub Actions: upload the Playwright report

GitHub’s Playwright CI guide demonstrates uploading the HTML report directory with an artifact name and retention setting. The example uses a 30-day retention setting; that is an example, not a recommendation for every repository. The path below is appropriate only if your workflow writes the report there. Add your actual screenshot or diff directory if it is separate.

#1 Best Overall
Sale
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400)
  • Easily store and access 2TB to content on the go with the Seagate Portable Drive, a USB external hard drive
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.
- name: Run Playwright tests
  run: npx playwright test

- name: Upload Playwright report
  uses: actions/upload-artifact@v5
  if: ${{ !cancelled() }}
  with:
    name: playwright-report
    path: playwright-report/
    retention-days: 30

Check the current action version and GitHub retention options in the Playwright CI guide and GitHub workflow artifacts documentation before adopting this example. GitHub describes screenshots and test results as common artifact contents, and artifacts can also share files between jobs. If you need failure evidence, make sure the upload step is not skipped just because tests failed; adjust the condition for your workflow and cancellation policy.

GitLab CI: upload on failure or every run

GitLab lets a job upload artifacts only on failure or regardless of job result. Choose always when successful-run evidence is useful too, or on_failure when you only need diagnostics for broken comparisons. Replace the example directories with paths your test setup actually creates.

Rank #2
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
  • Easily store and access 5TB of content on the go with the Seagate portable drive, a USB external hard Drive
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.
visual_tests:
  script:
    - npx playwright test
  artifacts:
    when: always
    expire_in: 1 week
    paths:
      - test-results/
      - playwright-report/

GitLab documents a default maximum final artifact archive size of 100 MB; instance, group, or project configuration can override it. It also documents keep-latest behavior that can affect whether older artifacts expire as expected. Confirm your instance’s limits and lifecycle behavior in the GitLab job artifacts documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Show screenshots beside failed test details

If you use GitLab’s test-report attachment flow, reference screenshot paths from the JUnit XML and upload both the XML and screenshot directory. This can put image evidence alongside test details rather than requiring a reviewer to find a separate archive. Follow the path and formatting requirements in GitLab’s screenshot attachment documentation.

Rank #3
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
  • Easily store and access 1TB to content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop. Reformatting may be required for Mac
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

Choose upload policy, retention, and access

Decision Practical choice Trade-off
When to upload Use failure-only uploads for mismatch diagnostics; use every-run uploads when successful output helps auditing or comparison. Every-run uploads preserve more context but create more artifacts to manage.
How long to retain Set an explicit period that matches review and debugging needs. Longer retention keeps evidence available longer; GitLab’s keep-latest behavior may affect expiration of recent pipeline artifacts.
Who can access Use the narrowest artifact access that still lets the team investigate and review changes. Broad access can expose data embedded in screenshots, logs, traces, or reports.
Where review happens Use downloadable bundles for general output, or attach screenshot paths to GitLab test reports when that suits the review flow. Report attachments are convenient, but still require correct paths and uploaded test-report files.

Artifact contents can expose credentials, tokens, source code, or application details. Playwright warns: “If you upload reports and traces as part of your CI workflow, make sure that you only upload them to trusted artifact stores, or that you encrypt the files before upload.” Review what the browser captured and restrict storage accordingly. See the Playwright CI guide.

Keep screenshots comparable across runs

CI artifacts help explain a mismatch, but they cannot make two different rendering environments equivalent. Keep the browser and operating system aligned with the environment used to create approved references, as Playwright recommends. If a visual test changes after an environment update, first determine whether the change is an intended application change or a changed rendering input. The cited guidance establishes the importance of environment consistency; it does not quantify the effect of individual variables such as fonts.

Rank #4
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue
  • Easily store and access 4TB of content on the go with the Seagate Portable Drive, a USB external hard drive.Specific uses: Personal
  • Designed to work with Windows or Mac computers, this external hard drive makes backup a snap just drag and drop
  • To get set up, connect the portable hard drive to a computer for automatic recognition no software required
  • This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable
  • The available storage capacity may vary.

Review a failed run’s actual screenshot and diff as evidence. Update the approved reference only after deciding that the new output is expected. The CI upload configuration preserves files; it does not approve them.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Troubleshoot missing or unhelpful artifacts

  • The artifact exists but contains no screenshots: the upload path may point to the HTML report while screenshots are elsewhere, or the framework may write files to a different configured location. Check the job’s output and configure the matching path.
  • Nothing uploads after a failed test: the upload step may be skipped when the test command exits nonzero. Use a failure-aware condition or provider setting so diagnostics upload on the outcomes you chose.
  • The archive is rejected or incomplete: check the provider’s artifact size limit and the total output size. GitLab’s documented default maximum final archive size is 100 MB, subject to instance, group, or project overrides.
  • Older GitLab artifacts remain available past expiry: keep-latest behavior for recent pipeline artifacts can affect expiration. Verify project settings and GitLab’s documented lifecycle behavior rather than assuming expire_in alone determines removal.
  • Images differ unexpectedly between runs: compare the browser and operating-system environment with the one used to create the approved screenshots before treating the difference as an application regression.
  • Artifacts expose information they should not: inspect screenshots, reports, traces, and logs for credentials or private application data; restrict access or encrypt files before upload to an appropriate trusted store.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If the task is to capture a page screenshot rather than run a browser-based visual comparison suite, ScreenshotNeo provides a screenshot API and MCP server. A single request can return an image; it does not replace your baseline comparison or CI artifact configuration.

Quick Recap

SaleBestseller No. 1
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400)
Seagate 2TB Portable Hard Drive | USB 3.0 (STGX2000400)
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$129.99
Bestseller No. 2
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
Seagate Portable 5TB External Hard Drive HDD – USB 3.0 for PC, Mac, PS4, & Xbox - 1-Year Rescue Service (STGX5000400), Black
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$229.99
Bestseller No. 3
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
Seagate Portable 1TB External Hard Drive HDD – USB 3.0 for PC, Mac, PlayStation, & Xbox, 1-Year Rescue Service (STGX1000400) , Black
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$119.80
Bestseller No. 4
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue
Seagate Portable 4TB External Hard Drive HDD – USB 3.0, 1-Year Rescue
This USB drive provides plug and play simplicity with the included 18 inch USB 3.0 cable; The available storage capacity may vary.
$208.99
Best Value
Sale
UnionSine 500GB Ultra Slim Portable External Hard Drive HDD-USB 3.0
  • [Upgraded Version] - This external hard drive features a mirrored logo stripe combined with a striped anti-slip design, and the rounded corners of the casing make it easier to grip. The stripes also have a heat dissipation function, ensuring stable and fast data transfer.
  • 【Ultra-thin and quiet】 - The motherboard adopts JMicron 578 noise-free solution, giving you a quiet working environment. Lightweight and portable size designed to fit in your pocket for easy portability.
  • 【Ultra-Fast Data Transfers】 - Pairing this external hard drive with JMicron 578 solution USB 3.0 and USB 2.0 interfaces enables blazing-fast data transfer. It boasts theoretical read speeds of up to 125MB/s and write speeds of up to 103MB/s.
  • 【Plug and Play】 - With no software to install, just plug it in and the drive is ready to use.The hard disk chip is wrapped with an aluminum anti-interference layer to increase heat dissipation and protect data.
  • 【What You Get】 - 1 x Portable Hard Drive, 1 x USB 3.0 Cable, 1 x User Manual, Gift-type shell packaging ,Three-year manufacturer's warranty and free technical support services.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo documentation for request options. Cookie banners, popups, and chat widgets are removed before the shot; bot checks, blank pages, and failed loads are never billed. Its MCP server lets AI agents take screenshots. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for 1,000 free screenshots a month with no card.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.