Open kumaraditya303 opened 3 years ago
I have implemented this feature in a separate pytest plugin, it also supports threshold for comparing snapshots
See https://github.com/kumaraditya303/pytest-playwright-snapshot
Install it with
$ pip install pytest-playwright-snapshot
cc to some users who requested it: @TommyXie1990 @utapyngo @chasays
There is a strong use case for including this type of testing, and my team would benefit from having this feature.
Thank you for creating a separate plugin for it, though it would be great to have it baked in.
@bgronemanLIO my tests are quite heavy on visual assertions. After trying couple of different solutions and pytest plugins I ended up with https://github.com/Visual-Regression-Tracker/Visual-Regression-Tracker - it's free, configuration is quite easy and provides reliable results. Also - it support few different comparison libs, so you can tweak the settings according to your needs.
It would be nice to have this kind of feature out-of-the-box, though - but I guess it's rather unlikely.
@aspenboy thanks for sharing that tool. It seem very robust I will consider integrating it into our pipeline.
No problem :) good luck!
Can you tell me when this method is planned to be implemented? pytest-playwright-snapshot is weak
Add support for snapshots of the page, screenshots etc like in jest
toMatchSnapshot
Example: https://github.com/kumaraditya303/pytest-playwright-snapshot