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

Golden binary compare for testing #44

Open
1 task done
gedw99 opened this issue Oct 18, 2024 · 2 comments
Open
1 task done

Golden binary compare for testing #44

gedw99 opened this issue Oct 18, 2024 · 2 comments
Labels
question Further information is requested

Comments

@gedw99
Copy link

gedw99 commented Oct 18, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Description

Can it do golden image or binary compare ?

Anything else?

I often need to check an image is what it should be.

it can probably just compare the file size so you would not need all the image compare imports .

Anyways the package is very useful and covers all the bases . Great work

@gedw99 gedw99 added the question Further information is requested label Oct 18, 2024
@FollowTheProcess
Copy link
Owner

FollowTheProcess commented Oct 18, 2024

No image comparison specifically. Golden files containing text are supported in test.File and you get a nice pretty line diff. I could imagine a raw bytes version but it would be tricky to make the output easy to understand/debug. The best you could probably do is simply say "the file contents do not match", difficult to show the diff in a binary file

@gedw99
Copy link
Author

gedw99 commented Oct 19, 2024

Impossible to do a diff / debug on a binary , unless we added some . Not worth it for the bloat.

just knowing that the binary is the same is enough for regression tests. If it does not match then use your own code to do real per binary format compare to help fix the bug :)

I have sample videos, images, pdf files that I commit into git lfs

@gedw99 gedw99 changed the title Golem binaries ? Golden binary compare for testing Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants