hey @lucassantosbicalho,
As we begin development of the {odsql} R package, we need to set up a reliable and reproducible testing infrastructure. It's important that our tests:
- Do not depend on an active internet connection
- Avoid hitting real endpoints repeatedly
- Support deterministic responses and edge case simulation
- Run quickly and consistently across environments (e.g., CI)
Proposal
I suggest we use:
{testthat} as our unit testing framework
{webfakes} to spin up a local HTTP server that mimics Opendatasoft’s API responses for testing purposes
This approach gives us complete control over:
- Mock datasets and responses (including query parameters)
- Simulating pagination, 404s, 401s, or malformed data
- Timing behavior (slow or failing endpoints)
- Facet and metadata endpoints
hey @lucassantosbicalho,
As we begin development of the
{odsql}R package, we need to set up a reliable and reproducible testing infrastructure. It's important that our tests:Proposal
I suggest we use:
{testthat}as our unit testing framework{webfakes}to spin up a local HTTP server that mimics Opendatasoft’s API responses for testing purposesThis approach gives us complete control over: