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

Test automation : How to compare images in UnitTest #89

Open
muukii opened this issue Mar 31, 2021 · 1 comment
Open

Test automation : How to compare images in UnitTest #89

muukii opened this issue Mar 31, 2021 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@muukii
Copy link
Collaborator

muukii commented Mar 31, 2021

adds unit tests that compare result image and expected image.

How do I compare images?

Metrics:

  • Color space, wide-color
  • Orientation
  • Performance
  • Cropping
  • loading MTLTexture
  • resizing
@muukii muukii added the help wanted Extra attention is needed label Mar 31, 2021
@muukii muukii changed the title Test automation Test automation : How to compare images in UnitTest Mar 31, 2021
@denisenepraunig
Copy link

Hello!

What about using a Snapshot library like https://github.com/pointfreeco/swift-snapshot-testing - you can record your desired images and then those will be used as a reference in a normal unit test.

I've been using this for UI testing at work - like checking if labels are still in the correct position.

You can define also threshold or so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants