id | title | sidebar_label | description | keywords | url | site_name | slug | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
download-artefacts-cypress |
Downloading Artefacts For A Cypress Project |
Download Artefacts For Cypress Project |
This article guides you on how to download the artefacts for a cypress project from LambdaTest Cloud machine. |
|
LambdaTest |
download-artefacts-cypress/ |
import CodeBlock from '@theme/CodeBlock'; import {YOUR_LAMBDATEST_USERNAME, YOUR_LAMBDATEST_ACCESS_KEY} from "@site/src/component/keys"; import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';
This article guides you on how to download the artefacts for a Cypress project from LambdaTest Cloud machine.
:::tip Sample repo
In this demo we are demonstrating using LambdaTest's sample Cypress Cloud repo. You can find all the resources used for this article in the linked repo. <img loading="lazy" src={require('../assets/images/icons/github.png').default} alt="Image" className="doc_img"/> View on GitHub
:::
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:
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 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.
<img loading="lazy" src={require('../assets/images/cypress/cypress4.png').default} alt="Image" width="1282" height="722" className="doc_img"/>
Append –-sync
flag in the run command as mentioned below and run your test on the LambdaTest platform.
lambdatest-cypress run --sync=true
Once the test gets executed, you will find a build_id
on the console corresponding to the executed test.
<img loading="lazy" src={require('../assets/images/cypress/cypress5.png').default} alt="Image" width="1282" height="722" className="doc_img"/>
Go to your lambdatest_run.json
file and copy the session_id
.
{
"build_id": "7724863",
"session_id": "6c899177-047e-4432-a9a7-17776e23aae3"
}
Now pass the session_id by running the following command.
lambdatest-cypress generate-report --session_id 6c899177-047e-4432-a9a7-17776e23aae3
- 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.
<img loading="lazy" src={require('../assets/images/cypress/cypress6.png').default} alt="Image" width="1282" height="722" className="doc_img"/>
-
The file name will be created with the session_id combined with the browser name, browser version, and the test id corresponding to it.
<img loading="lazy" src={require('../assets/images/cypress/cypress7.png').default} alt="Image" width="1282" height="722" className="doc_img"/>
:::tip Support That’s all! In case you have any questions or need any additional information, you could reach out at our <span className="doc__lt" onClick={() => window.openLTChatWidget()}>[24X7 Chat Support] or mail us directly at support@lambdatest.com. :::