Skip to content

Commit

Permalink
docs: Document the retain feature
Browse files Browse the repository at this point in the history
  • Loading branch information
mhan83 committed Apr 22, 2024
1 parent a14efe8 commit a6d983b
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions docs/web-apps/automated-testing/cypress/yaml/v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -613,10 +613,13 @@ Specifies how to manage test artifacts, such as logs, videos, and screenshots.
```yaml
artifacts:
cleanup: true
retain:
generated-report-dir: report.zip
download:
when: always
match:
- junit.xml
- report.zip
directory: ./artifacts/
```

Expand All @@ -635,6 +638,35 @@ artifacts:

---

### `retain`

<p><small>| OPTIONAL | OBJECT |</small></p>

Define directories to archive and retain as a test asset at the end of a test run. Archived test assets can
be downloaded automatically using the `download` configuration or via the
[REST API](https://docs.saucelabs.com/dev/api/jobs/#get-a-job-asset-file) or through the test details page.

```yaml
artifacts:
retain:
source-directory: destination-archive.zip
download:
when: always
match:
- destination-archive.zip
directory: ./artifacts/
```

:::note
The source and destination will be relative to the `rootDir` defined in your configuration.
:::

:::note
The destination archive must have a .zip file extension.
:::

---

### `download`

<p><small>| OPTIONAL | OBJECT |</small></p>
Expand Down

0 comments on commit a6d983b

Please sign in to comment.