Download Artifacts for Cypress Projects: A How-To Guide

Download Artifacts for Cypress Projects

Automation testing has become the backbone of modern software development. Whether you’re shipping microservices or full-fledged web applications, having fast, reliable feedback loops is non-negotiable. Cypress, one of the most widely adopted JavaScript-based end-to-end testing frameworks, offers this promise – clean APIs, fast test execution, and developer-friendly tooling. But there’s a lesser-discussed hero in this process: artifacts.

Yes, those logs, videos, screenshots, and reports – artifacts are your north star when it comes to debugging test failures or analyzing trends. This guide dives into how you can download artifacts from Cypress projects and use them to your advantage.

But before we get our hands dirty, there’s one burning debate developers keep revisiting lately: Playwright vs Cypress – which one reigns supreme? And does your choice impact how you manage or download test artifacts? Let’s find out.

Playwright vs Cypress: A Context Before We Dive In

You’re probably already familiar with both tools, but here’s why this debate matters, especially when you’re focused on productivity and traceability. Cypress brings simplicity to the developer workflow – it runs in the browser, gives rich feedback through its test runner, and captures videos and screenshots out-of-the-box. On the other hand, Playwright offers more flexibility – multi-browser support, parallel execution, and native handling of multiple tabs and frames.

Now, when it comes to artifact management, both frameworks allow you to capture logs, videos, and screenshots. But Cypress takes the cake in terms of ease. It automatically generates and stores artifacts for every test run – no extra configurations, just clean results.

This guide focuses on Cypress, but it’s crucial to keep the Playwright vs Cypress discussion in the back of your mind, especially if you’re scaling your test infrastructure.

What Are Artifacts in Cypress?

Artifacts are the output files generated during your test execution. These include:

  • Screenshots: Taken on test failure or manually using commands like cy.screenshot()

  • Videos: Entire test sessions recorded when video: true is set in config

  • Test Reports: Generated using Mocha reporters or third-party plugins

  • Logs & Debug Info: Depending on integrations like cypress-terminal-report or your CI/CD setup


In simpler terms, artifacts are your receipts. If something breaks, you don’t guess – you look. They help teams reproduce bugs, understand flakiness, and even serve as historical documentation.

Why Downloading Artifacts Matters

It’s one thing to generate artifacts, and another to access them when and where you need them. If you’re running tests on your local machine, artifacts are easy to find. But in CI/CD pipelines or remote cloud environments, downloading them becomes a crucial step in debugging and collaboration.

Here’s why downloading artifacts is essential:

  • Faster Debugging: You don’t have to rerun the entire suite to replicate a bug.

  • Audit Trail: Save copies for regulatory or quality audits.

  • Team Collaboration: Share artifacts across teams to speed up resolution.

  • Trend Analysis: Analyze past failures and improve test reliability.

Where Cypress Stores Artifacts

By default, Cypress stores all test artifacts in the cypress folder inside your project:

  • Screenshotscypress/screenshots

  • Videoscypress/videos

But when integrated into CI/CD tools like GitHub Actions, GitLab CI, or Jenkins, the location might shift depending on the runner’s workspace configuration.

Pro tip: Always configure artifact upload steps in your CI to ensure these files persist post-run.

Downloading Cypress Artifacts in CI/CD

When you’re working with a CI/CD setup, you need to actively define steps that upload and expose artifacts for download. Let’s break it down by typical environments and approaches.

GitHub Actions

In GitHub Actions, you can use the actions/upload-artifact package to save and download Cypress artifacts. Here’s what you need to know:

  • Define artifact paths after your test job

  • Specify retention days if needed

  • Download manually via the GitHub UI or REST API

GitLab CI

GitLab makes it even easier with its artifacts: block:

  • You can configure it directly in the .gitlab-ci.yml

  • Artifacts are downloadable right from the job summary UI

  • You can limit them by file types or size to control storage costs

Jenkins

For Jenkins, the post-build actions allow you to archive Cypress test artifacts:

  • Use the “Archive the artifacts” plugin

  • Add wildcard paths like cypress/screenshots/**/*

  • Artifacts show up in your Jenkins build page

Each of these platforms supports command-line access to download files too. This is useful when integrating with Slack bots or reporting systems.

Using Automation Testing Tools for Better Artifact Handling

There are multiple automation testing tools in the ecosystem today that help manage, store, and present test artifacts in a user-friendly way. But not all tools are made equal.

Many modern teams now prefer integrating Cypress with cloud-based orchestration tools that not only run tests at scale but also handle artifacts seamlessly. This shift is part of a larger DevOps and shift-left movement – where visibility, speed, and observability matter more than ever.

If you’re not yet using a tool that allows you to manage your artifacts centrally, you’re missing out on major productivity gains.

Best Practices for Managing and Downloading Cypress Artifacts

There are so many tips you’ll find online, but let’s cut through the noise. Here are the best practices you should always follow to get the most out of your Cypress artifacts:

Keep Your Artifacts Organized

  • Use consistent naming conventions

  • Store artifacts in date-stamped folders

  • Separate success and failure artifacts if possible

Compress and Retain Smartly

  • Use gzip or zip utilities to reduce storage size

  • Define retention policies to delete stale artifacts

Enable Artifact Collection for Local Runs

  • Use custom scripts to zip up cypress/videos and cypress/screenshots folders post-run

  • Sync them to shared folders or cloud buckets

Use Meta Tagging

  • Tag artifacts by branch name, commit hash, or test category

  • Makes searching through historical runs much easier

Real-World Example: Debugging Flaky Tests with Artifacts

Let’s say you’re running a flaky e2e test in your checkout flow. Locally it passes, but on CI, it keeps failing intermittently. You check the test script – looks solid. Now, instead of guessing, you grab the video and screenshot artifacts.

You notice a spinner icon that doesn’t disappear within the expected 2 seconds. Boom! Found the flakiness cause. Maybe your test needs to wait for a backend call, or you have to rewrite it with better assertions.

Without artifacts, you’d be scratching your head or running multiple tests aimlessly. With artifacts, debugging becomes clinical, not chaotic.

LambdaTest: Simplifying Artifact Management at Scale

Now, here’s where cloud-native testing platforms change the game.

LambdaTest is an AI Native test orchestration and execution platform that lets you run manual and automated tests at scale with over 5000+ real devices, browsers, and OS combinations. As one of the leading automation testing tools, LambdaTest simplifies cross-browser and cross-device testing for teams of all sizes. When you integrate your Cypress project with LambdaTest, artifact management becomes a walk in the park.

Here’s how LambdaTest fits into your Cypress artifact workflow:

  • Auto-uploaded Artifacts: Every test run on LambdaTest automatically stores videos, screenshots, and logs.

  • Smart Access: Artifacts are easily accessible through the LambdaTest dashboard, filtered by test ID or session.

  • Team Collaboration: Shareable URLs for each test run make it easy for QA, devs, and managers to review issues.

  • Extended Retention: You can get the Cypress test result as an artifact after your workflow is executed. You can store the generated videos or screenshots as CI artifacts.

This is especially useful for remote teams or organizations running 1000s of tests per day. No more SSHing into CI machines or hunting through Jenkins directories. LambdaTest gives you observability and speed in one place.

And with GenAI tools in LambdaTest’s roadmap, you’ll soon get auto-debug recommendations by analyzing your artifacts – talk about next-gen productivity.

Advanced: Automating Artifact Downloads via APIs

If you’re serious about automation, you might want to trigger artifact downloads programmatically. This is particularly handy for:

  • Creating bug reports with evidence

  • Archiving results in internal systems

  • Building dashboards that pull the latest runs

Most CI/CD systems offer APIs to download artifacts. For example:

  • GitHub: Use the REST API endpoint /repos/:owner/:repo/actions/artifacts/:artifact_id/zip

  • GitLab: GET /projects/:id/jobs/:job_id/artifacts

  • LambdaTest: REST APIs available for session details and artifact fetch

Just make sure your tokens are stored securely and are scoped correctly to avoid permission issues.

Common Mistakes You Should Avoid

Let’s save you some headaches. These are classic pitfalls teams fall into when handling Cypress artifacts:

  • Not Saving Artifacts in CI: Tests fail, logs vanish – always upload artifacts as part of the job.

  • Overwriting Local Runs: Use unique names or date suffixes to prevent loss of older results.

  • Storage Overload: Don’t hoard everything forever. Compress and purge often.

  • Security Neglect: If your screenshots include sensitive data, make sure artifact access is protected.

Trends Shaping the Future of Test Artifacts

The way teams treat test artifacts is evolving rapidly. Some trends worth noting:

  • AI-Powered Analysis: Tools are starting to auto-diagnose test failures based on artifact data.

  • Visual-Only Workflows: Screenshots and videos are becoming primary sources of truth.

  • Shift to the Cloud: Artifact storage is moving to cloud buckets and distributed networks.

  • Artifact-Driven Reporting: Stakeholders want one-click insights based on visual evidence.

In 2025, artifacts won’t just be logs – they’ll be knowledge. And tools that treat them as first-class citizens will dominate the automation ecosystem.

Conclusion

Artifacts might seem like a byproduct of testing, but in reality, they’re a goldmine of insight. With Cypress, accessing and managing artifacts is straightforward, especially when you’re leveraging modern infrastructure and cloud orchestration platforms like LambdaTest.

Whether you’re stuck between Playwright vs Cypress or just trying to tighten your testing loops, remember this: your tests are only as valuable as your ability to learn from them. And artifacts are the breadcrumbs that lead the way.

So go ahead – capture, download, analyze. Make your artifacts work for you.

By Tgtube

Related Post

Leave a Reply

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