4 ms·
This is what I do I have ca. 190 test cases on which I run my software and compare the md5 sums of the resulting PDF. If they are not the same, I create a PNG
by patrickg 4y ago
This is what I do
I have ca. 190 test cases on which I run my software and compare the md5 sums of the resulting PDF. If they are not the same, I create a PNG for every page and compare visually with imagemagick.
The trick is to remove all random stuff from the PDF (like ID generation or such).
This takes about 3 seconds on the M1 Pro laptop. I think this is very much okay.
Links:
https://github.com/speedata/publisher/tree/develop/qa https://github.com/speedata/publisher/tree/develop/qa (the tests)
https://github.com/speedata/publisher/blob/develop/src/go/sp/compare.go https://github.com/speedata/publisher/blob/develop/src/go/sp... (the Go source code for the comparison)