httptest (2.3.4)

0 users

A Test Environment for HTTP Requests.

http://enpiar.com/r/httptest
https://github.com/nealrichardson/httptest
http://cran.r-project.org/web/packages/httptest

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: AlphaVantageClient, crplyr, crunch, edgarWebR, googleAnalyticsR, googleAuthR, googleLanguageR, httpcache, rGoodData

Released 4 days ago.


8 previous versions

Ratings

Overall:

  (0 votes)

Documentation:

  (0 votes)

Log in to vote.

Reviews

No one has written a review of httptest yet. Want to be the first? Write one now.


Related packages:(20 best matches, based on common tags.)


Search for httptest on google, google scholar, r-help, r-devel.

Visit httptest on R Graphical Manual.