The-Compiler / pytest-xvfb

A pytest plugin to run Xvfb (or Xephyr/Xvnc) for tests.
MIT License
70 stars 11 forks source link

xvfb snapshots? #25

Closed up2l8 closed 4 years ago

up2l8 commented 4 years ago

Is it possible to create .png snapshots of the frame buffer before/during/after tests are run? Or maybe on a periodic basis? It could be useful in debugging and such.

The-Compiler commented 4 years ago

I like the idea, but I wonder if this wouldn't fit better into a separate pytest plugin - is there something in that functionality that would be specific to Xvfb?

up2l8 commented 4 years ago

I think you are right. I was thinking you'd interact with the frame buffer file directly but it makes much more sense to use available screen capture tools with DISPLAY set correctly.

The-Compiler commented 4 years ago

Closing this then - I'd probably use that functionality myself for qutebrowser, but I don't think it should be part of the Xvfb plugin. Maybe some day I'll find the time for a pytest-screenshots plugin, unless someone else wants to write one :wink: