Selenium/How-to/Record videos of test runs

From mediawiki.org
Jump to navigation Jump to search

This page will assume you know how to run Selenium tests. If not, see Selenium/Getting Started/Run tests targeting MediaWiki-Docker.

wdio-video-reporter NPM package is used to record videos. It supports WebdriverIO v5 and above. By default, videos for all tests will be recorded. Alert messages and pop ups will not be recorded.

Video recording it not yet set up for all repositories. See phab:T253113.

Run Selenium tests[edit]

npm run selenium-test

Videos[edit]

Videos are recorded automatically. They are located in tests/selenium/log/ folder. You can play them using a video player like VLC.

ls -1 tests/selenium/log/*.mp4

tests/selenium/log/Page--should-be-creatable--CHROMEHEADLESS--03-25-2021--16-33-25-380.mp4
tests/selenium/log/Page--should-be-deletable--CHROMEHEADLESS--03-25-2021--16-33-39-487.mp4
tests/selenium/log/Page--should-be-editable-daily--CHROMEHEADLESS--03-25-2021--16-33-31-901.mp4
tests/selenium/log/Page--should-be-previewable--CHROMEHEADLESS--03-25-2021--16-33-22-892.mp4
tests/selenium/log/Page--should-be-re-creatable--CHROMEHEADLESS--03-25-2021--16-33-28-614.mp4
tests/selenium/log/Page--should-have-history-daily--CHROMEHEADLESS--03-25-2021--16-33-36-680.mp4
tests/selenium/log/User--should-be-able-to-create-account--CHROMEHEADLESS--03-25-2021--16-34-26-530.mp4