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

[FEATURE] Add support for visual regression / snapshot testing #63

Open
kumaraditya303 opened this issue Jun 20, 2021 · 6 comments
Open

Comments

@kumaraditya303
Copy link
Contributor

kumaraditya303 commented Jun 20, 2021

Add support for snapshots of the page, screenshots etc like in jest toMatchSnapshot

Example: https://github.com/kumaraditya303/pytest-playwright-snapshot

@mxschmitt mxschmitt changed the title [FEATURE] Add support for snapshot testing out of box [FEATURE] Add support for visual regression / snapshot testing Aug 6, 2021
@kumaraditya303
Copy link
Contributor Author

kumaraditya303 commented Aug 19, 2021

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

@ghost
Copy link

ghost commented Oct 25, 2023

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.

@aspenboy
Copy link

@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.

@ghost
Copy link

ghost commented Oct 25, 2023

@aspenboy thanks for sharing that tool. It seem very robust I will consider integrating it into our pipeline.

@aspenboy
Copy link

No problem :) good luck!

@paigusov
Copy link

Can you tell me when this method is planned to be implemented?
pytest-playwright-snapshot is weak

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants