This directory contains comprehensive tests for the GERDA package, written using the testthat framework.
The test suite is organized into the following files:
test-gerda_data_list.RTests for the gerda_data_list() function:
print_table = TRUE/FALSEtest-load_gerda_web.RTests for the load_gerda_web() function:
Note: These tests focus on parameter validation and error handling rather than actual data downloading, to avoid network dependencies during testing.
test-party_crosswalk.RTests for the party_crosswalk() function:
test-integration.RIntegration tests demonstrating typical package workflows:
To run the complete test suite:
# Install and load required packages
library(devtools)
# Run all tests
test()
# Or run specific test files
test_file("tests/testthat/test-gerda_data_list.R")
The test suite includes 164 individual test cases covering:
When all tests pass, you should see output similar to:
[ FAIL 0 | WARN 0 | SKIP 0 | PASS 164 ]
These tests are designed to:
The tests require the following packages:
testthat (>= 3.0.0) - Testing frameworkdplyr - For integration tests with tidyverse workflowsOptional dependencies:
devtools - For running tests during developmentAny scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.