Tests and Coverage
06 September, 2025 07:49:32
tests_and_coverage.RmdThis output is created by covrpage.
Coverage
Coverage summary is created using the covr package.
| Object | Coverage (%) |
|---|---|
| demoProject1 | 100 |
| R/stats_utilities.R | 100 |
Unit Tests
Unit Test summary is created using the testthat package.
| file | n | time | error | failed | skipped | warning |
|---|---|---|---|---|---|---|
| test-stats_utilities.R | 21 | 0.16 | 0 | 0 | 0 | 0 |
Show Detailed Test Results
| file | context | test | status | n | time |
|---|---|---|---|---|---|
| test-stats_utilities.R | stats_utilities | add_ci computes correct confidence intervals | PASS | 3 | 0.01 |
| test-stats_utilities.R | stats_utilities | stopifnot_with_message does not error when condition is TRUE | PASS | 1 | 0.02 |
| test-stats_utilities.R | stats_utilities | stopifnot_with_message errors when condition is FALSE | PASS | 1 | 0.00 |
| test-stats_utilities.R | stats_utilities | load_data loads a CSV file | PASS | 2 | 0.02 |
| test-stats_utilities.R | stats_utilities | load_data errors when file does not exist | PASS | 1 | 0.00 |
| test-stats_utilities.R | stats_utilities | assert_is_valid_data_frame passes for a valid data frame | PASS | 1 | 0.00 |
| test-stats_utilities.R | stats_utilities | assert_is_valid_data_frame errors for NULL | PASS | 1 | 0.02 |
| test-stats_utilities.R | stats_utilities | assert_is_valid_data_frame errors for non-data.frame | PASS | 1 | 0.02 |
| test-stats_utilities.R | stats_utilities | assert_is_valid_parameter passes for a valid parameter | PASS | 1 | 0.00 |
| test-stats_utilities.R | stats_utilities | assert_is_valid_parameter errors for non-character | PASS | 1 | 0.01 |
| test-stats_utilities.R | stats_utilities | assert_is_valid_parameter errors for NA | PASS | 1 | 0.02 |
| test-stats_utilities.R | stats_utilities | assert_dataframe_has_column passes when column exists | PASS | 1 | 0.00 |
| test-stats_utilities.R | stats_utilities | assert_dataframe_has_column errors when column does not exist | PASS | 1 | 0.00 |
| test-stats_utilities.R | stats_utilities | filter_complete returns rows with non-NA values | PASS | 2 | 0.02 |
| test-stats_utilities.R | stats_utilities | summarise_parameter computes correct mean and sd | PASS | 3 | 0.02 |
Session Info
| Field | Value |
|---|---|
| Version | R version 4.5.1 (2025-06-13 ucrt) |
| Platform | x86_64-w64-mingw32/x64 |
| Running | Windows 11 x64 (build 26100) |
| Language | German_Germany |
| Timezone | Europe/Berlin |
| Package | Version |
|---|---|
| testthat | 3.2.3 |
| covr | 3.6.4 |
| covrpage | 0.2 |