@@ -11,15 +11,18 @@ output: github_document
1111<!-- badges: end -->
1212
1313** testthis** makes unit testing in R more comfortable. It is designed to
14- complement the packages ** testthat** , ** devtools** and ** usethis** .
14+ complement the packages
15+ [ testthat] ( https://github.com/r-lib/testthat ) ,
16+ [ devtools] ( https://github.com/r-lib/devtools ) and
17+ [ usethis] ( https://github.com/r-lib/usethis ) .
1518
1619
1720
1821## Overview
1922
20- testthis provides RStudio addins for common tasks. These can be called like
21- normal R function, but it is also possible to assigned to hotkeys to them in
22- RStudio (* Tools/Modify Keyboard Shortcuts* ).
23+ testthis provides RStudio addins for working with files that contain tests.
24+ These can be called like normal R function, but it is also possible to
25+ assigned them to hotkeys RStudio (* Tools/Modify Keyboard Shortcuts* ).
2326
2427* ` test_this() ` : Reloads the package and runs tests associated with the
2528 currently open R script file.
@@ -37,7 +40,7 @@ testthis also provides functions for managing tests in subdirectories of
3740
3841* ` use_testdata() ` places a single R object in the ` tests/testhat/testdata `
3942 directory. It is analoguous to ` usethis::use_data() ` , except that it saves the
40- Object in the ` .rds ` format, which is more appropriate for single R objects
43+ object in the ` .rds ` format, which is more appropriate for single R objects
4144 than ` .rda ` or ` .Rdata ` (see ` ?readRDS ` ).
4245* ` use_testdata_raw() ` creates the directory ` tests/testhat/testdata-raw ` . Use
4346 this directory to put scripts that generate the data in
@@ -46,22 +49,23 @@ testthis also provides functions for managing tests in subdirectories of
4649 saved with ` use_testdata() ` .
4750* ` use_test_subdir() ` and ` test_subdir() ` for putting/running tests in
4851 subdirectories of ` tests/testhat/ ` . These tests will * not* be run on CRAN or
49- by ` devtools::test() ` . This is useful for tests that require
50- external ressources (web, databases) or take long to execute.
52+ by ` devtools::test() ` . This is useful for tests that take a long time to
53+ execute, or that require external ressources (web, databases) that may not
54+ always be availabe.
5155
5256 ` test_acceptance() ` , ` test_manual() ` and
5357 ` test_integration() ` are presets to run tests in the
5458 ` integration_tests ` , ` acceptance_tests ` and ` manual_tests ` subdirectories of
5559 ` test/testthat ` .
5660
5761
58- Testthis also provuides some primtivie code analys tools
62+ Testthis also provides some simple code analysis tools
5963
6064* ` test_coverage() ` lists all functions of package and shows whether they
61- are mentioned in anny ` test_that( ` calls's desc argument; e.g. if you have
65+ are mentioned in any ` test_that() ` calls' desc argument; e.g. if you have
6266 a testfile containing ` test_that("testing that function foo works", <...>) ` ,
63- ` foo() ` will show up as tested. This can function as a simple todo list for
64- testing, but does not replace a proper test coverage analyzer like
67+ ` foo() ` will show up marked as tested. This can be used as a simple todo list
68+ for testing, but does not replace a proper test coverage analyzer like
6569 [ covr] ( https://github.com/r-lib/covr ) .
6670* ` test_index() ` produces an index of all ` test_that() ` calls. Supports RStudio
6771 Markers when run interactively from within RStudio.
0 commit comments