# TODO
馃彎 [[ https://gerrit.wikimedia.org/r/c/mediawiki/core/+/422933 | 22933 ]]: Selenium: record video of every test
馃彎 {T193157}
# How to test locally
- [[ https://www.mediawiki.org/wiki/Selenium/Node.js/Inside_MediaWiki-Vagrant#Run_the_Selenium_tests_and_record_video_of_each_test | Run the Selenium tests and record video of each test ]]
- Run tests using [[ http://manpages.ubuntu.com/manpages/trusty/man1/xvfb-run.1.html | xvfb-run ]]:
```
vagrant@vagrant:/vagrant/mediawiki$ xvfb-run npm run selenium
```
# Description
It was implemented in Ruby framework. There are two options:
- Sauce Labs
- Xvfb
There are tools similar to [[ https://rubygems.org/gems/headless | headless ]] ruby gem:
- [[ https://www.npmjs.com/package/headless | headless ]]
- [[ https://www.npmjs.com/package/xvfb | xvfb ]]
- [[ https://github.com/lightsofapollo/x-recorder | x-recorder ]]
- [[ https://www.npmjs.com/package/fluent-ffmpeg | fluent-ffmpeg ]]
- https://www.npmjs.com/package/fluent-ffmpeg#inputoptionsoption-add-custom-input-options
Video is recorded via [[ https://ffmpeg.org/ffmpeg.html | ffmpeg ]].
Links:
- http://elementalselenium.com/tips/38-headless
- http://shawnzhu.blogspot.hr/2014/04/feedback-information-from.html
- https://phabricator.wikimedia.org/source/integration-config/browse/master/dockerfiles/npm-browser-test/run-with-xvfb.sh
- http://afterdesign.net/2016/02/07/recording-headless-selenium-tests-to-mp4.html