This article guides you on how to download the artefacts for a Cypress project from LambdaTest Cloud machine.
In this demo we are demonstrating using LambdaTest's sample Cypress Kitchen Sink repo. You can find all the resources used for this article in the linked repo. View on GitHub
Downloading The Data From The LambdaTest Cloud Machine
Assuming that you have run a Cypress test on lambdatest platform ( if not, this article here will guide you in running your first Cypress test on LambdaTest), you need to follow these steps below:
Update LambdaTest Cypress CLI
Before getting started, you would have to update the lambdatest-cypress cli using the command below:
npm install -g lambdatest-cypress-cli
Add downloads Capability
Add "downloads" capability in the
lambdatest-config.json file and define the files/directories that you wanted to download in this capability. You can mention multiple file paths in this capability separated by a comma. Refer to the below example for the same.
Add -sync Flag
–sync flag in the run command as mentioned below and run your test on the LambdaTest platform. Once the test gets executed, you will find a
session_id on the console corresponding to the executed test.
lambdatest-cypress run --sync=true
Add session_id In -sid Flag
Add the created session_id in the
–sid flag and download the artifacts by running the below command:
lambdatest-cypress generate-report \
View The Downloaded Folder
A new folder with the name lambdatest-artifacts will get created in the root directory of your project and all the files will be downloaded in this folder.
The file name will be created with the session_id combined with the browser name, browser version, and the test id corresponding to it.
That’s all! In case you have any questions or need any additional information, you could reach out at our [24X7 Chat Support] or mail us directly at [email protected].