1

Seeing blank video while running protractor tests in headless mode using Xvfb, ffmpeg, protractor video reporter

I am using protractor framework for running automation tests. I am using protractor video recorder tool to record video on headless mode. The prerequisite for that is to start Xvfb at the background.

This the setting i am using to run test in headless mode. Steps followed to enable video in headless mode:

Installed "npm i protractor-video-reporter"
Included ffmpeg setting for docker/linux.
```
 var VideoReporter = require('protractor-video-reporter');
 jasmine.getEnv().addReporter(new VideoReporter({
    baseDirectory: 'reports/videos',
    singleVideo: false,
    saveSuccessVideos: true,
    ffmpegCmd: '/usr/bin/ffmpeg',
    ffmpegArgs: [
      '-y',
      '-r', '30',
      '-f', 'x11grab',
      '-s', '1280x1024',
      '-i', 'process.env.DISPLAY',
      '-g', '300',
      '-vcodec', 'mpeg4'
    ]
  }));
    Executed "Xvfb :99 -ac -screen 5 1024x768x8 -listen tcp &" in a terminal
    Executed ```
       DISPLAY=:99  
       export $DISPLAY
``` in a separate window 
    Executed "env DEBUG=protractor-video-reporter protractor conf.js" in a separate terminal

Expected Result:

A video with the recordings that runs tests on google chrome

Actual Result:

Video is getting created but the video appears to be blank.

Chrome Version:73
Chromedriver Version: 2.46
Protractor version:5.4.2
sxg
  • 43
  • 4
  • 3
    If you use xvbf, why you run in headless mode. xvbf can supply a virtual display in memory, then run in non-headless model. – yong Mar 30 '19 at 01:01
  • Thanks yong. Your input worked for me. I am able to see the videos now instead of blank video. – sxg Apr 04 '19 at 06:34

0 Answers0