Custom skippers to run some tests only where you want.
Some built-in skippers: operating system, CRAN, etc.
Demo 🚀
What we just saw
Snapshot testing
Custom skippers
What about real requests?
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.
Demo 🚀
How to get better at writing CI workflows?
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 🙌
Read testthat docs, the HTTP testing in R book, etc.
HTTP testing
vcr handy for usual workflows, and highly configurable.
Other HTTP testing packages: httptest, webfakes.
For databases, see dittodb!
Thank you, useR! team & participants!
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!
Questions
Right now if we have time.
In the lounge during the next days but asynchronously.
Beyond inline expectations
When you want to test
large/complicated output,
binary files like images,
error messages…
Think about snapshot testing!
From testthat third edition.