-
Notifications
You must be signed in to change notification settings - Fork 2
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
implement end-to-end-tests #21
Comments
After some googling, these packages could be useful for measuring image similarity It should be enough to test the outputs of For xlsx files, we could go down the rabbit hole with the headless version of libreoffice. However, the headless testing can wait until after the CRAN release. |
Seems like we can even make a bitwise comparison with library(styledTables)
st <- styled_table(mtcars)
write_png(st, "ex1.png")
write_png(st, "ex2.png")
tools::md5sum("ex1.png")
#> ex1.png
#> "d6611369188488028b862cda981136ca"
tools::md5sum("ex2.png")
#> ex2.png
#> "d6611369188488028b862cda981136ca" Testing against hashes would be nice since
On the other hand, this test is very strict and could lead to incorrect failures |
Update: Bitwise comparison fails if the testing environment is not the same as the environment generating the checksums. I get different checksums for ubuntu 16.04 and ubuntu 18.04. In other words, we need a similarity measure for png files in order to run the checks on travis. |
I am not sure if it makes sense to put much effort into this for the CRAN release since it is currently not clear how they deal with the CTAN dependencies. Therefore, I'll remove the CRAN label for this issue for now. @a-maldet feel free to disagree. |
It would be great to have End-To-End-Tests for the package.
The results could be compared by a image distance measurement in order to classify
success
orfailure
.The text was updated successfully, but these errors were encountered: