ronkeizer / vpc

R library to create visual predictive checks (VPC)
Other
36 stars 20 forks source link

tests #9

Open dpastoor opened 9 years ago

dpastoor commented 9 years ago

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.

ronkeizer commented 9 years ago

OK

billdenney commented 3 years ago

@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.

billdenney commented 3 years ago

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!