This output is created by covrpage.
library(covr , warn.conflicts = FALSE , quietly = TRUE) library(knitr , warn.conflicts = FALSE , quietly = TRUE) library(magrittr , warn.conflicts = FALSE , quietly = TRUE)
#test_x <- testthat::test_dir('testthat') this_pkg <- basename(normalizePath('..')) test_x <- testthat::test_check(this_pkg,reporter = testthat::default_reporter(),stop_on_failure = FALSE,stop_on_warning = FALSE) skip <- length(test_x)>0
test_m <- covrpage::map_testthat('testthat')
test_x_short <- test_x%>% covrpage::testthat_summary(type='short') test_x_long <- test_x%>% covrpage::testthat_summary(type='long')
test_skip <- test_x_long[test_x_long$status!='PASS',c('file','test')] test_skip$file <- gsub('#(.*?)$','',basename(test_skip$file)) test_skip <- merge(test_skip,test_m)
test_skip <- test_m
Coverage summary is created using the covr package.
covrpage::coverage_skip(test_path = '../tests/testthat', test_skip = test_skip)%>% covrpage::covr_summary()%>% knitr::kable(digits = 2, col.names = c('Object','Coverage (%)'),align = c('l','c'))
Unit Test summary is created using the testthat package.
cat('All tests were skipped')
test_x_short%>% knitr::kable()
r sprintf('%s',if(skip) test_details(test_x_short))>
Show Detailed Test Results
cat('All tests were skipped')
test_x_long%>% knitr::kable()
Session Info
x <- covrpage:::sinfo() x$info%>% knitr::kable() x$pkgs%>% knitr::kable()
r sprintf('<!--- Final Status : %s --->', test_to_badge(test_x_short))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.