# wdio-testrecorder-service

> Package to record and save wdio cucumber test executions

Latest version **2.0.0** (published 2022-05-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install wdio-testrecorder-service
pnpm add wdio-testrecorder-service
yarn add wdio-testrecorder-service
bun add wdio-testrecorder-service
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2022-05-19 |
| First published | 2022-05-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 19.3 KB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Tamil Selvan |
| Maintainers | tamil2320 |
| Keywords | webdriverio, wdio, wdio-plugin, wdio-service, cucumber, recorder, screen recorder, wdio-cucumber, test-recorder, wdio-recorder, wdio-cucumber-recorder, wdio-cucumber-test-recorder |

## Links

- npm: https://www.npmjs.com/package/wdio-testrecorder-service
- Repository: https://github.com/tamil777selvan/wdio-testrecorder-service
- Homepage: https://github.com/tamil777selvan/wdio-testrecorder-service#readme
- Issues: https://github.com/tamil777selvan/wdio-testrecorder-service/issues
- npm.io page: https://npm.io/package/wdio-testrecorder-service

## Dependencies (5)

- [fs](https://npm.io/package/fs.md) 0.0.1-security
- [path](https://npm.io/package/path.md) 0.12.7
- [uuid](https://npm.io/package/uuid.md) ^8.3.2
- [fs-extra](https://npm.io/package/fs-extra.md) ^10.1.0
- [@ffmpeg-installer/ffmpeg](https://npm.io/package/@ffmpeg-installer/ffmpeg.md) 1.1.0

## Recent versions

- 2.0.0 (latest) — 2022-05-19
- 1.0.0 — 2022-05-18

## README

# wdio-testrecorder-service
A service for [WDIO](https://webdriver.io/) that generates videos of your wdio cucumber test executions.

This service uses [ffmpeg](https://www.ffmpeg.org/) to convert sequence of images to video.
## Installation

You can simple do it by:

```bash
npm i wdio-testrecorder-service
```

Instructions on how to install `WDIO` can be found [here](http://webdriver.io/guide/getstarted/install.html)

## Configuration
Configure the output directory in your wdio.conf.js file:

```js
exports.config = {
    // ...
    services: [
      [
        'TestRecorder', {
            attachVideoToCucumberReport: true
        }
      ]
    ]
  // ...
}
```
Options to override default capabilities...

- `videoOutputPath` - Output folder path to store video reports.
- `attachVideoToCucumberReport` - Attach the recorded video to cucumber reports.
- `removeAttachedVideos` - Delete the saved video from temp file once attacted to cucumber reports.
- `jsonWireActions` - Array of string for which screenshots needs to be captured in `afterCommad` hooks.


**Note:**
 -  `attachVideoToCucumberReport` will work only if [cucumberjs-json](https://www.npmjs.com/package/wdio-cucumberjs-json-reporter) reporter is enabled. Existance of cucumber report is not validated. So, before enabling `removeAttachedVideos` as `true` make sure you have the cucumber reporter enabled. Else would endup in lossing the video generated.

## Default Values:

  - videoOutputPath - `./tmp`
  - attachVideoToCucumberReport - `false`
  - removeAttachedVideos - `false`
  - jsonWireActions - 
  
  ```js
  [
    "executeScript",
    "elementClick",
    "click",
    "elementClear",
    "clearValue",
    "setValueImmediate",
    "pressKeyCode",
    "hideKeyboard",

    "url",
    "performActions",
    "releaseActions",
    "keys",
    "doubleClick",
    "execute",
    "scrollIntoView",
    "dragAndDrop",
    "elementSendKeys",
    "addValue",
    "setValue",
    "moveTo",
    "selectByIndex",
    "selectByAttribute",
    "selectByVisibleText",

    "waitForDisplayed",
    "waitForExist",
    "waitForEnabled",
    "switchToWindow",
    "closeWindow"
  ]
  ```
  
## Limitations
Since this service captures screenshot in runtime increases the execution timeline.

---
_Source: https://npm.io/package/wdio-testrecorder-service · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
