For AI agents and LLMs: a machine-readable index is available at llms.txt. A plain-Markdown version of any documentation page is available by appending .md to its URL.
Skip to main content

How to Download Artefacts for Cypress Tests on TestMu AI


When your Cypress tests run on the TestMu AI cloud machine, the screenshots, videos, logs, and downloaded files they produce stay on that remote machine. You can pull those artefacts back into your local project to debug failures, attach evidence to a report, or archive a run. You do it by adding a downloads capability to lambdatest-config.json, running the test with --sync, then generating a report that fetches everything into a local lambdatest-artifacts folder.

Sample repo

This guide uses the TestMu AI sample Cypress Cloud repository. Clone it to follow along with the same files shown here.

TestMu AI Cypress sample repository on GitHub View on GitHub

Download Artefacts From the TestMu AI Cloud Machine​


These steps assume you have already run a Cypress test on TestMu AI. If you have not, see how to run your first Cypress test first, then return here to fetch its artefacts.

Update the TestMu AI Cypress CLI​


Update the CLI first so the --sync and generate-report commands are available. Install the latest version:

Verified
npm install -g lambdatest-cypress-cli

Add the downloads Capability​


Tell TestMu AI which files to bring back by adding a downloads capability to lambdatest-config.json. List each file or directory path you want, separated by commas.

downloads capability defined in the lambdatest-config.json file

Add the --sync Flag​


Run the test with the --sync flag so the CLI waits for execution to finish before it fetches the artefacts:

Verified
lambdatest-cypress run --sync=true

Once the run completes, the console prints a build_id for the executed test.

build_id printed in the console after a synced Cypress run

Get the session_id​


Open lambdatest_run.json in your project and copy the session_id:

Verified
lambdatest_run.json
{
"build_id": "7724863",
"session_id": "6c899177-047e-4432-a9a7-17776e23aae3"
}

Pass that session_id to the generate-report command to pull the artefacts:

Verified
lambdatest-cypress generate-report --session_id 6c899177-047e-4432-a9a7-17776e23aae3

View the Downloaded Folder​


The CLI creates a lambdatest-artifacts folder in your project root and downloads every requested file into it.

lambdatest-artifacts folder created in the project root directory

Each file is named with the session_id combined with the browser name, browser version, and test id it came from, so you can trace every artefact back to its session.

Downloaded artefact file named with session id, browser name, version, and test id

Continue with the guides below to configure and debug your Cypress runs on TestMu AI.

Terminal First Testing With Kane CLI

Natural language browser & mobile app tests right from terminal.

×
Schedule Your Personal Demo
Kane CLI terminal

Help and Support

Related Articles