statistikat / STATcubeR

R interface for the STATcube REST API and data.statistik.gv.at
https://statistikat.github.io/STATcubeR/
GNU General Public License v2.0
14 stars 1 forks source link

Unit-Testing with `{httptest}` #42

Open GregorDeCillia opened 1 year ago

GregorDeCillia commented 1 year ago

There is already a first attempt to include unit tests for the STATcube API using {httptest} in #40 . The basic idea is to have a way to test the parsers and print methods for sc_table() and friends when submitting the package to CRAN.

One important question here is which cubes/databases should be used in the tests. One reccomendation is the "Gemeindedaten (Demo)" databse. However, in order to maximize code-coverage, some databases with annotations and missing values would be required. Unfortunately, the "Gemeindedaten (Demo)" database only provides missings/annotations of the kind "X: cross tabulation not allowed". Another useful thing would be to have different types of time variables (half year, month, week, quarter, year)

Canidate databases