UNPKG

codeceptjs

Version:

Supercharged End 2 End Testing Framework for NodeJS

56 lines (40 loc) 1.6 kB
--- permalink: /plugins/screencast editLink: false sidebar: auto title: screencast --- <!-- Generated by documentation.js. Update this documentation by updating the source code. --> ## screencast Records WebM video of tests using Playwright's screencast API. When `captions` is enabled, action annotations are burned into the video; when `subtitles` is enabled, a standalone `.srt` is also produced. Default `on=fail` keeps videos for failed tests only; `on=test` keeps every test's video. Note: enabling Playwright's helper-level `video: true` together with this plugin produces two independent recordings (`output/videos/*.webm` from the helper, `output/screencast/*.webm` from this plugin). #### Configuration ```js plugins: { screencast: { enabled: true, on: 'fail', } } ``` #### `on=` modes * **fail** — record while running; delete on pass, keep on fail (default) * **test** — record and keep every test's video Other config options: * `captions`: burn-in action overlays via `page.screencast.showActions()`. Default: true. * `subtitles`: also write a standalone `.srt` file alongside the video. Default: false. * `video`: record a video. With `video=false, subtitles=true`, only the `.srt` is produced. Default: true. * `size`: pass-through `{ width, height }` for `screencast.start`. * `quality`: pass-through 0–100 for `screencast.start`. CLI examples: npx codeceptjs run -p screencast npx codeceptjs run -p screencast:on=test npx codeceptjs run -p screencast:on=test;captions=false;subtitles=true ### Parameters * `config`