Skip to content
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

Support video recording of test running #2151

Closed
6 tasks
AlexanderMoskovkin opened this issue Feb 20, 2018 · 6 comments
Closed
6 tasks

Support video recording of test running #2151

AlexanderMoskovkin opened this issue Feb 20, 2018 · 6 comments
Assignees
Labels
!IMPORTANT! STATE: Auto-locked An issue has been automatically locked by the Lock bot. TYPE: enhancement The accepted proposal for future implementation.
Milestone

Comments

@AlexanderMoskovkin
Copy link
Contributor

Proposal

Last update 2/20/2018

What?

Provide an ability to create a video of a test run (in Chrome and Firefox (included headless) at start ).

Why?

Make it easier to identify why your test is failed. Especially it's actual for CI.

How?

I guess the best way is make screenshots by using browser's api and make a video from them by using a tool like ffmpeg.

Questions to answer.

  • Make one big video for the whole test run or create a separated video for every test? (I vote for the second case).
  • Save a video for every test or just for failed test? (I vote for 'failed only')

Additional requirements.

  • It should be possible to configure video quality settings

Things to do:

  • - Investigate possibility to make screenshots in Firefox;
  • - Investigate possibility to use ffmpeg or find other way;
  • - Investigate how much machine resources it requires;
  • - Figure out new API (all available options);
  • - Implement;
  • - Find ways how to save/get video for popular CI systems.

Something else?

If anyone have some thoughts here feel free to comment

@AlexanderMoskovkin AlexanderMoskovkin added the TYPE: enhancement The accepted proposal for future implementation. label Feb 20, 2018
@AlexanderMoskovkin AlexanderMoskovkin added this to the Sprint #11 milestone Feb 20, 2018
@ahungry
Copy link

ahungry commented Mar 2, 2018

We just started to test out something similar for grabbing screen videos of tests by launching a child_process.spawn of ffmpeg (and closing it) in Before() / After() hooks, naming it based on the SUT/scenario. Unfortunately, it relies on being able to record the active x11 screen session (ie, won't work in headless mode).

Maybe it would work in headless if something like xvfb was used to simulate an x11 display?

Our setup is currently testcafe+cucumberjs, so we're relying on the cucumber Before/After hooks and just using testcafe as a driver+assertion framework.

The we're using to generate the mkv is:

              child_process.spawn(
                '/usr/bin/ffmpeg',
                `-f x11grab -s 1024x700 -i :0.0+0,40 -c:v libx264 -preset ultrafast -crf 0 /tmp/${name}.mkv`.split(' ')
              )

@ahungry
Copy link

ahungry commented Mar 2, 2018

Another thought - for C.I. you could run the setup in non-headless within a docker container (therefore, no reliance on xvfb or headless mode), we did something similar with selenium docker images (just watch when needed by hooking to a vnc server the container was running).

@AndreyBelym
Copy link
Contributor

AndreyBelym commented Aug 21, 2018

Implementation of the feature is delayed due to unclear consequences of adding LGPL licensed FFMPEG to TestCafe dependencies. I'm in process in process of clarifying legal considerations with our lawyer.

@AndreyBelym AndreyBelym modified the milestones: Sprint #16, Planned Aug 21, 2018
@andrzej-woof
Copy link

For anyone who is desperate to record video from Chrome (e.g. to troubleshoot headless CI) I've made this reporter https://www.npmjs.com/package/testcafe-reporter-chrome-recorder

I wouldn't recommend to use it if there's an alternative but worked for me.

@AndreyBelym AndreyBelym modified the milestones: Sprint #23, Sprint #24 Dec 12, 2018
@AndreyBelym AndreyBelym modified the milestones: Sprint #24, Sprint #25 Dec 27, 2018
@AndreyBelym AndreyBelym modified the milestones: Sprint #25, Sprint #26 Jan 18, 2019
@AndreyBelym
Copy link
Contributor

Closed by daa552b.

@lock
Copy link

lock bot commented Mar 27, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or feature requests. For TestCafe API, usage and configuration inquiries, we recommend asking them on StackOverflow.

@lock lock bot added the STATE: Auto-locked An issue has been automatically locked by the Lock bot. label Mar 27, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
!IMPORTANT! STATE: Auto-locked An issue has been automatically locked by the Lock bot. TYPE: enhancement The accepted proposal for future implementation.
Projects
None yet
Development

No branches or pull requests

5 participants