Open dpastoor opened 9 years ago
OK
@devinpastoor, do you know of a good way to automate visual tests? I just made a PR switching to testthat
, so I hope that it would be simpler to integrate more tests.
And, as a follow-up to my own comment, it looks like vdiffr (https://github.com/r-lib/vdiffr) is used by ggplot2, so it should be good enough for us!
I see this package suited two test 'suites' - unit tests for the functions and processes and a visual check to make sure we're getting the output we expect.
Unit tests can be added incrementally, but for the visual tests we could use some existing datasets and use xpose or 'manually' check that they are correct, save the output as images then whenever we make substantial changes we can run the new code and make sure we can generate the plots so they look the same. It shouldn't be too difficult to have an Rmarkdown document almost like a vignette that would display the plots side-by-side for comparison.