tdd-workflow - Test-driven R development with testthat
Guides R development with test-first tests, unit and integration testing, edge-case checks, and a minimum 80% coverage target using testthat.
Tags
Updated: 2026-10-05Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Initialize testthat infrastructure
- Write tests before code
- Run unit and integration tests
- Create snapshot tests
- Check test coverage
- Test error scenarios
Inputs
- R package source code
- Expected behavior
- Test data and fixtures
- Feature or bug requirements
Outputs
- R test files
- Test results
- Snapshot files
- Coverage status
Requirements
- R package project
- testthat Edition 3
- usethis package
- devtools package
