Skip to content
This repository has been archived by the owner. It is now read-only.
Record videos of Nightwatch.js test sessions. Uses ffmpeg to capture a (remote) webdriver desktop screen.
Branch: master
Clone or download
Latest commit 6e002bb Feb 19, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Use record-screen as ffmpeg API. Feb 19, 2019
.npmignore Initial commit. Nov 12, 2016
README.md Use record-screen as ffmpeg API. Feb 19, 2019
index.js Use record-screen as ffmpeg API. Feb 19, 2019
package-lock.json 3.0.0 Feb 19, 2019
package.json 3.0.0 Feb 19, 2019

README.md

Nightwatch.js video screen recording via ffmpeg

Record videos of Nightwatch.js test sessions.
Uses ffmpeg to capture a (remote) webdriver desktop screen.

Install

npm install nightwatch-video-recorder

Usage

Add the following beforeEach/afterEach hooks:

module.exports = {
  beforeEach: function (browser, done) {
    require('nightwatch-video-recorder').start(browser, done)
  },
  afterEach: function (browser, done) {
    require('nightwatch-video-recorder').stop(browser, done)
  }
}

Enable the video screen recording in your test settings:

{
  "test_settings": {
    "default": {
      "videos": {
        "enabled": true,          // Enable video recordings
        "delete_on_pass": true,   // Delete video when tests pass
        "dir": "reports/videos",  // Video directory
        "ext": ".mp4",            // Video file extension
        "resolution": "1440x900", // Display resolution
        "fps": 15,                // Frames per second
        "hostname": "localhost",  // X11 server hostname
        "display": "0",           // X11 server display
        "pixelFormat": "yuv420p"  // Output pixel format
      }
    }
  }
}

See blueimp/nightwatch for a complete setup example.

License

Released under the MIT license.

Author

Sebastian Tschan

You can’t perform that action at this time.