Skip to content

Commit

Permalink
BREAKING: update documentation by setting default video: false
Browse files Browse the repository at this point in the history
  • Loading branch information
AtofStryker committed Jun 13, 2023
1 parent 3317a0d commit 0bbb65e
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 17 deletions.
4 changes: 2 additions & 2 deletions docs/api/commands/screenshot.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ Another potential problem to be aware of is that our own Command Log is using
React under the hood and only rendering asynchronously during an animation
frame. It is possible you will see screenshots taken before our Command Log is
done rendering. This means you may not see the **error displayed** in the
screenshot. But this is also why we take a video - to show you the complete
failure.
screenshot. But this is also why we allow taking a video - to show you the
complete failure.

We make our best effort to synchronize taking a screenshot with our renderer,
but the current state of your application under test could have changed in the
Expand Down
4 changes: 3 additions & 1 deletion docs/guides/continuous-integration/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ insight into what happened when your tests ran.
- Get the entire stack trace of failed tests.
- View screenshots taken when tests fail and when using
[`cy.screenshot()`](/api/commands/screenshot).
- Watch a video of your entire test run or a clip at the point of test failure.
- If enabled, watch a video of your entire test run or a clip at the point of
test failure.
- See which machines ran each test when
[parallelized](/guides/guides/parallelization).

Expand Down Expand Up @@ -376,6 +377,7 @@ values in the Cypress configuration.
**_Typical use cases would be modifying things like:_**

- `CYPRESS_BASE_URL`
- `CYPRESS_VIDEO`
- `CYPRESS_VIDEO_COMPRESSION`
- `CYPRESS_REPORTER`
- `CYPRESS_INSTALL_BINARY`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ the state of the app UI at the point of failure or see the events that led up to
the failure.

Cypress assists with debugging in headless mode, by automatically taking a
screenshot of the app UI and command log at the exact point of test failure. To
help see everything that happened prior to test failure, Cypress provides a
video recording (as an MP4 file) of a full test spec run by default.
screenshot of the app UI and command log at the exact point of test failure. If
enabled, to help see everything that happened prior to test failure, Cypress
provides a video recording (as an MP4 file) of a full test spec run by default.

### Test Retries

Expand Down
23 changes: 15 additions & 8 deletions docs/guides/guides/screenshots-and-videos.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,28 @@ to clear your screenshots folder before a run, you can set

## Videos

Cypress records a video for each spec file when running tests during
`cypress run`. Videos are _not_ automatically recorded during `cypress open`.
If enabled, Cypress records a video for each spec file when running tests during
`cypress run`. Videos are _not_ recorded during `cypress open`.

Video recording can be turned off entirely by setting
[`video`](/guides/references/configuration#Videos) to `false` from within your
Video recording can be turned on by setting
[`video`](/guides/references/configuration#Videos) to `true` from within your
configuration.

:::cypress-config-example

```ts
{
video: true
}
```

Videos are stored in the
[`videosFolder`](/guides/references/configuration#Videos) which is set to
`cypress/videos` by default.

After `cypress run` completes, Cypress automatically compresses the video in
order to save on file size. By default it compresses to a `32 CRF`, but this is
configurable with the
[`videoCompression`](/guides/references/configuration#Videos) property.
After `cypress run` completes, Cypress compresses the video in order to save on
file size. By default it compresses to a `32 CRF`, but this is configurable with
the [`videoCompression`](/guides/references/configuration#Videos) property.

When using the `--record` flag while running your tests, videos are processed,
compressed, and uploaded to [Cypress Cloud](/guides/cloud/introduction) after
Expand Down
4 changes: 2 additions & 2 deletions docs/guides/overview/why-cypress.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ do that no other testing framework can:
- **Consistent Results:** Our architecture doesn't use Selenium or WebDriver.
Say hello to fast, consistent and reliable tests that are flake-free.
- **Screenshots and Videos:** View screenshots taken automatically on failure,
or videos of your entire test suite when run from the CLI. Record to
[Cypress Cloud](/guides/cloud/introduction) to store them with your test
or videos, if enabled, of your entire test suite when run from the CLI. Record
to [Cypress Cloud](/guides/cloud/introduction) to store them with your test
results for zero-configuration debugging.
- **Cross Browser Testing:** Run tests within Firefox and Chrome-family browsers
(including Edge and Electron) locally and
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/references/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ For more options regarding screenshots, view the
| `trashAssetsBeforeRuns` | `true` | Whether Cypress will trash assets within the `downloadsFolder`, `screenshotsFolder`, and `videosFolder` before tests run with `cypress run`. |
| `videoCompression` | `32` | The quality setting for the video compression, in Constant Rate Factor (CRF). The value can be `false` to disable compression or a value between `0` and `51`, where a lower value results in better quality (at the expense of a higher file size). |
| `videosFolder` | `cypress/videos` | Where Cypress will automatically save the video of the test run when tests run with `cypress run`. |
| `video` | `true` | Whether Cypress will capture a video of the tests run with `cypress run`. |
| `video` | `false` | Whether Cypress will capture a video of the tests run with `cypress run`. |
| `videoUploadOnPasses` | `true` | Whether Cypress will process, compress, and upload videos to [Cypress Cloud](/guides/cloud/introduction) even when all tests in a spec file are passing. This only applies when recording your runs to Cypress Cloud. Turn this off if you'd like to only upload the spec file's video when there are failing tests. |

### Downloads
Expand Down

0 comments on commit 0bbb65e

Please sign in to comment.