New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce video recording of tests #361
Labels
Comments
Any updates on this? @und3fined-v01d what's in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
🚀 Feature Proposal
Implement an out of the box solution for recording videos of test runs with Jest and Puppeteer.
Motivation
Well, there are three main reasons why you should be recording videos of all your tests:
Example
The video recorder primarily runs as a custom reporter.
Xvfb
server and currently works only for Linux.DISPLAY
which basically triggers the test to run in a browser on the CI within an Xvfb server.videorecorder.js
ffmpeg
instance after each test is over. The video is saved as a.mp4
file in the folder specified byoutputDir
. This is how we call the video recorder in a globalbeforeEach
and kill it in a globalafterEach
. The code resides in a filejest.setup.js
which is passed tosetupFilesAfterEnv
in thejest.config.js
filejest.setup.js
jest.config.js
We have bootstrapped the code for a video recorder as a custom reporter and can be found here:
https://gerrit.wikimedia.org/r/c/mediawiki/core/+/602302
The recorder video for test can be found here:
https://integration.wikimedia.org/ci/job/mediawiki-quibble-selenium-vendor-docker/18336/artifact/log/Page-should-be-deletable.mp4
Pitch
Why does this feature belong in the Jest Puppeteer ecosystem?
Currently I am working as a student developer at Wikimedia Foundation for Google Summer of Codes 2020. My major task is to evaluate browser automation replacements for WebdriverIO and we have Puppeteer as one of our contenders, the other being Cypress.
What we found to be highly useful for debugging our E2E test was having video recording of each test run. Most of our tests run on our Jenkins CI environment which runs a slightly different configuration of our core software than the one we use for development and often things that run locally would fail on CI primarily because of differing Node.js versions, differing Chrome versions, etc. Screenshots and video recording have helped us come a long way and I think this would help the community at large as well and it would be awesome if we could include it as an out of the box solution.
The text was updated successfully, but these errors were encountered: