When you want to test
large/complicated output,
binary files like images,
error messages…
Think about snapshot testing!
From testthat third edition.
Custom skippers to run some tests only where you want.
Some built-in skippers: operating system, CRAN, etc.
Snapshot testing
Custom skippers
Fixtures are great but what if the API output changed & we didn’t notice? 😱
Let’s schedule runs of continuous integration, where we turn off vcr.
Get inspired by others!
LIFE HACK: My go-to strategy for getting Travis builds to work is snooping on *other* people's .travis.yml files. Shoutout today to the tidyr .travis.yml for solving my problem! #rstats 🙌
— Julia Silge (@juliasilge) December 12, 2019
Also get inspired by others!
Read testthat docs, the HTTP testing in R book, etc.
vcr handy for usual workflows, and highly configurable.
Other HTTP testing packages: httptest, webfakes.
For databases, see dittodb!
Thanks in particular to Heather Turner (technical helper), Liz Hare (useR! accessibility team) and Yanina Bellini Saibene (global coordinator). And thanks to all other useR! volunteers!
Right now if we have time.
In the lounge during the next days but asynchronously.