npm

wdio-testrecorder-service
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

wdio-testrecorder-service

A service for WDIO that generates videos of your wdio cucumber test executions.

This service uses ffmpeg to convert sequence of images to video.

Installation

You can simple do it by:

npm i wdio-testrecorder-service

Instructions on how to install WDIO can be found here

Configuration

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

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 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 -
[
  "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.

Dependencies (5)

Dev Dependencies (5)

Package Sidebar

Install

npm i wdio-testrecorder-service

Weekly Downloads

0

Version

2.0.0

License

MIT

Unpacked Size

19.7 kB

Total Files

19

Last publish

Collaborators

  • tamil2320