You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had a use-case where I was refactoring a tool that was used for generating PDFs (with Apache PDFBox). I used approval tests to verify the images rendered using the PDFs as approvals. However, there was a problem where the renderer would generate slightly different images on different platforms. This caused problems where I had to create new approvals every time I changed the system I was working on, as well as won't work well with CI.
To solve this, I wrote a different image approver using an image similarity check and the gist is available HERE. This is written in Kotlin, and would be easily portable to Java. I'd love to contribute this back to the project. Would this be something that you'd like to get into the project? I can raise a PR if so.
The text was updated successfully, but these errors were encountered:
I have just encuntered this very usecase. We attempted to use AwtApprovals for a PDF rendered to an image via PDFBox. It works fine locally but fails in CI, very possibly due to "irrelevant" rendering differences. Being able to set a threshold for an image match would be most welcome.
I set a reminder so that I hopefully remember next Monday when we get together and work on ApprovalTests again.
Let's see what we can do about this issue :)
I had a use-case where I was refactoring a tool that was used for generating PDFs (with Apache PDFBox). I used approval tests to verify the images rendered using the PDFs as approvals. However, there was a problem where the renderer would generate slightly different images on different platforms. This caused problems where I had to create new approvals every time I changed the system I was working on, as well as won't work well with CI.
To solve this, I wrote a different image approver using an image similarity check and the gist is available HERE. This is written in Kotlin, and would be easily portable to Java. I'd love to contribute this back to the project. Would this be something that you'd like to get into the project? I can raise a PR if so.
The text was updated successfully, but these errors were encountered: