Lightweight and Feature Complete Unit Testing Framework
Overview
Provides a lightweight (zero-dependency) and easy to use unit testing framework. Main features: install tests with the package. Test results are treated as data that can be stored and manipulated. Test files are R scripts interspersed with test commands, that can be programmed over. Fully automated build-install-test sequence for packages. Skip tests when not run locally (e.g. on CRAN). Flexible and configurable output printing. Compare computed output with output stored with the package. Run tests in parallel. Extensible by other packages. Report side effects.
- tt.pr.color is now set to FALSE when the NO_COLOR environment variable is set. See https://no-color.org/
- expect_<condition> now uses conditionMessage internally. This should increase compatibility with packages defining custom conditions. (thanks to Tim Taylor for suggesting and Etienne Bacher for reporting)
- expect_match is now available when testing packages (thanks to Tim Taylor for the PR and Marcel Ramos for reporting)
- fix in pattern matching for warnings (thanks for Matthijs Berends for the PR)
- Fixed exit_if_not() that would always exit (thanks to Vincent Arel-Bundock for reporting)
From NEWS in the release
Install
Health
- OK13 OK2026-08-04
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
- Help pages
- 20 (2 internal)
- Examples that run
- 72%13 run in a plain check · 1 only when donttest examples are enabled (R CMD check --as-cran) · 4 never run
- Exported functions with examples
- 89%
- Documented parameters
- 92%
- Return-value docs
- 68%
- Help pages citing references
- 0%
Downloads
Repository
- PRs merged (all time)
- 93%
- Median days to close, 50 most recently updated closed issues
- 8
- Median days to close, 50 most recently updated closed PRs
- 2
Stars over time
Forks over time
Issues over time
PRs over time
1 development-tooling and community-health practice detected across 1 family in the upstream repository
Checks run against github.com/markvanderloo/tinytest on 2026-10-22.
Dependencies
Installing tinytest adds no packages beyond those that come with R.
Show the 48 most downloaded packagesHide the 48 most downloaded packages
Code & Tests
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- 1.4.3Latest
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- 1.4.1
- RR 4.2.0 released · 2022-04-22
- 1.3.12021-07-06 · diff ↗
- RR 4.1.0 released · 2021-05-18
- 1.2.4
- 1.2.32020-10-07 · diff ↗
- 1.2.22020-06-18 · diff ↗
- 1.2.12020-05-18 · diff ↗
- 1.2.02020-05-06 · diff ↗ ·
added 4 exports
expect_equal_to_reference, expect_equivalent_to_reference, expect_stdout, get_call_wd - RR 4.0.0 released · 2020-04-24
- 1.1.02019-09-26 · diff ↗
Show 7 earlier eventsHide 7 earlier events
- 1.0.02019-08-23 · diff ↗ ·
added 6 exports
exit_file, expect_null, puppy, register_tinytest_extension, report_side_effects, using - 0.9.62019-06-28 · diff ↗ ·
added 6 exports
all_fail, all_pass, any_fail, any_pass, expect_message, expect_silent - 0.9.4
- 0.9.3
- RR 3.6.0 released · 2019-04-26
- 0.9.22019-04-25
- RR 3.5.0 released · 2018-04-23
Package metadata
- First published
- 2019-04-25
- Total releases
- 14 / 7 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 3.0.0
- Download size
- 582 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("tinytest")The package provides a citation file, so citation() returns the authors' own entry.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.