httptest (2.3.4)

A Test Environment for HTTP Requests.

Testing code and packages that communicate with remote servers can be painful. Dealing with authentication, bootstrapping server state, cleaning up objects that may get created during the test run, network flakiness, and other complications can make testing seem too costly to bother with. But it doesn't need to be that hard. This package enables one to test all of the logic on the R sides of the API in your package without requiring access to the remote service. Importantly, it provides three test contexts that mock the network connection in different ways, and it offers additional expectations to assert that HTTP requests were--or were not--made. It also allows you to record real API responses to use as mocks in tests. With these tools, one can test that code is making the intended requests and that it handles the expected responses correctly, all without depending on a connection to a remote API.

Maintainer: Neal Richardson
Author(s): Neal Richardson [aut, cre]

License: MIT + file LICENSE

Uses: digest, httr, jsonlite, testthat, knitr, rmarkdown, xml2
Reverse suggests: alfr, AlphaVantageClient, briqr, colourlovers, congressbr, crplyr, crunch, crunchy, datapackage.r, dkanr, echor, edgarWebR, googleAnalyticsR, googleAuthR, googleLanguageR, hackeRnews, httpcache, MODIStsp, mstrio, noaaoceans, PetfindeR, pivotaltrackR, portalr, ProPublicaR, qualtRics, ramlegacy, rGoodData, rnassqs, rnbp, Rpoet, sen2r, shutterstock

Released about 2 years ago.