Showing 4 of total 4 results (show query)
ropensci
vcr:Record 'HTTP' Calls to Disk
Record test suite 'HTTP' requests and replays them during future runs. A port of the Ruby gem of the same name (<https://github.com/vcr/vcr/>). Works by hooking into the 'webmockr' R package for matching 'HTTP' requests by various rules ('HTTP' method, 'URL', query parameters, headers, body, etc.), and then caching real 'HTTP' responses on disk in 'cassettes'. Subsequent 'HTTP' requests matching any previous requests in the same 'cassette' use a cached 'HTTP' response.
Maintained by Scott Chamberlain. Last updated 25 days ago.
httphttpsapiweb-servicescurlmockmockinghttp-mockingtestingtesting-toolstddunit-testingvcr
77 stars 10.06 score 165 scriptsnealrichardson
httptest:A Test Environment for HTTP Requests
Testing and documenting code that communicates with remote servers can be painful. Dealing with authentication, server state, 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 contexts that mock the network connection in different ways, as well as testing functions to assert that HTTP requests were---or were not---made. It also allows one to safely record real API responses to use as test fixtures. The ability to save responses and load them offline also enables one to write vignettes and other dynamic documents that can be distributed without access to a live server.
Maintained by Neal Richardson. Last updated 1 years ago.
81 stars 9.46 score 276 scripts 1 dependentsnealrichardson
httptest2:Test Helpers for 'httr2'
Testing and documenting code that communicates with remote servers can be painful. This package helps with writing tests for packages that use 'httr2'. It enables testing all of the logic on the R sides of the API without requiring access to the remote service, and it also allows recording real API responses to use as test fixtures. The ability to save responses and load them offline also enables writing vignettes and other dynamic documents that can be distributed without access to a live server.
Maintained by Neal Richardson. Last updated 9 months ago.
33 stars 9.37 score 95 scripts 1 dependentsropensci
webmockr:Stubbing and Setting Expectations on 'HTTP' Requests
Stubbing and setting expectations on 'HTTP' requests. Includes tools for stubbing 'HTTP' requests, including expected request conditions and response conditions. Match on 'HTTP' method, query parameters, request body, headers and more. Can be used for unit tests or outside of a testing context.
Maintained by Scott Chamberlain. Last updated 2 months ago.
httphttpsapiweb-servicescurlmockmockingfakewebhttp-mockingtestingtesting-toolstddhttp-mock
49 stars 8.29 score 141 scripts 1 dependents