Web Application Testing
anthropics/skills
Tests local web applications with Python Playwright scripts, checking frontend behavior, capturing screenshots and reading browser console logs.
Best practices for writing R package tests using testthat version 3+.
$ npx skills add quarto-dev/quarto-r --skill testing-r-packages -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install quarto-dev/quarto-r testing-r-packages --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/quarto-dev/quarto-r.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/testing-r-packages .claude/skills/testing-r-packages && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "testing-r-packages" agent skill from https://github.com/quarto-dev/quarto-r/tree/main/.claude/skills/testing-r-packages into .claude/skills/testing-r-packages/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "testing-r-packages", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/quarto-dev/quarto-r/tree/main/.claude/skills/testing-r-packagesType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add quarto-dev/quarto-r --skill testing-r-packages -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install quarto-dev/quarto-r testing-r-packages --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/quarto-dev/quarto-r.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/testing-r-packages .agents/skills/testing-r-packages && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "testing-r-packages" agent skill from https://github.com/quarto-dev/quarto-r/tree/main/.claude/skills/testing-r-packages into .agents/skills/testing-r-packages/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "testing-r-packages", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add quarto-dev/quarto-r --skill testing-r-packages -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install quarto-dev/quarto-r testing-r-packages --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/quarto-dev/quarto-r.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/testing-r-packages .cursor/skills/testing-r-packages && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "testing-r-packages" agent skill from https://github.com/quarto-dev/quarto-r/tree/main/.claude/skills/testing-r-packages into .cursor/skills/testing-r-packages/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "testing-r-packages", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/quarto-dev/quarto-r.git --path .claude/skills/testing-r-packages--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add quarto-dev/quarto-r --skill testing-r-packages -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install quarto-dev/quarto-r testing-r-packages --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/quarto-dev/quarto-r.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/testing-r-packages .gemini/skills/testing-r-packages && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "testing-r-packages" agent skill from https://github.com/quarto-dev/quarto-r/tree/main/.claude/skills/testing-r-packages into .gemini/skills/testing-r-packages/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "testing-r-packages", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install quarto-dev/quarto-r testing-r-packagesInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add quarto-dev/quarto-r --skill testing-r-packages -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/quarto-dev/quarto-r.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/testing-r-packages .github/skills/testing-r-packages && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "testing-r-packages" agent skill from https://github.com/quarto-dev/quarto-r/tree/main/.claude/skills/testing-r-packages into .github/skills/testing-r-packages/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "testing-r-packages", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add quarto-dev/quarto-r --skill testing-r-packages -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install quarto-dev/quarto-r testing-r-packages --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/quarto-dev/quarto-r.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/testing-r-packages .opencode/skills/testing-r-packages && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "testing-r-packages" agent skill from https://github.com/quarto-dev/quarto-r/tree/main/.claude/skills/testing-r-packages into .opencode/skills/testing-r-packages/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "testing-r-packages", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
testing-r-packagesBest practices for writing R package tests using testthat version 3+.
Testing R Packages is an agent skill from quarto-dev/quarto-r. Best practices for writing R package tests using testthat version 3+. Use when writing, organizing, or improving tests for R packages. Covers test structure, expectations, fixtures, snapshots, mocking, and modern testthat 3 patterns including self-sufficient tests, proper cleanup with withr, and snapshot testing.
Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `references/advanced.md`, `references/bdd.md` and `references/fixtures.md`).
It sits in Testing & QA. The repository describes itself as: R interface to quarto-cli. The licence is MIT.
5 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit bd2329a. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are r).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Testing R Packages loads about 2.8k tokens when it runs, and up to ~12k if it reads all its reference files. Until then it costs about 83 tokens; SKILL.md has 589 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from quarto-dev/quarto-r at commit bd2329a, republished under its MIT licence (© quarto-dev). 589 words, ~2,783 tokens.
.claude/skills/testing-r-packages/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.Modern best practices for R package testing using testthat 3+.
Initialize testing with testthat 3rd edition:
usethis::use_testthat(3)This creates tests/testthat/ directory, adds testthat to DESCRIPTION Suggests with Config/testthat/edition: 3, and creates tests/testthat.R.
Mirror package structure:
R/foofy.R → tests in tests/testthat/test-foofy.Rusethis::use_r("foofy") and usethis::use_test("foofy") to create paired filesSpecial files:
helper-*.R - Helper functions and custom expectations, sourced before testssetup-*.R - Run during R CMD check only, not during load_all()fixtures/ - Static test data files accessed via test_path()Tests follow a three-level hierarchy: File → Test → Expectation
test_that("descriptive behavior", {
result <- my_function(input)
expect_equal(result, expected_value)
})Test descriptions should read naturally and describe behavior, not implementation.
For behavior-driven development, use describe() and it():
describe("matrix()", {
it("can be multiplied by a scalar", {
m1 <- matrix(1:4, 2, 2)
m2 <- m1 * 2
expect_equal(matrix(1:4 * 2, 2, 2), m2)
})
it("can be transposed", {
m <- matrix(1:4, 2, 2)
expect_equal(t(m), matrix(c(1, 3, 2, 4), 2, 2))
})
})Key features:
describe() groups related specifications for a componentit() defines individual specifications (like test_that())it() without code creates pending test placeholdersUse describe() to verify you implement the right things, use test_that() to ensure you do things right.
See references/bdd.md for comprehensive BDD patterns, nested specifications, and test-first workflows.
Three scales of testing:
Micro (interactive development):
devtools::load_all()
expect_equal(foofy(...), expected)Mezzo (single file):
testthat::test_file("tests/testthat/test-foofy.R")
# RStudio: Ctrl/Cmd + Shift + TMacro (full suite):
devtools::test() # Ctrl/Cmd + Shift + T
devtools::check() # Ctrl/Cmd + Shift + Eexpect_equal(10, 10 + 1e-7) # Allows numeric tolerance
expect_identical(10L, 10L) # Exact match required
expect_all_equal(x, expected) # Every element matches (v3.3.0+)expect_error(1 / "a")
expect_error(bad_call(), class = "specific_error_class")
expect_no_error(valid_call())
expect_warning(deprecated_func())
expect_no_warning(safe_func())
expect_message(informative_func())
expect_no_message(quiet_func())expect_match("Testing is fun!", "Testing")
expect_match(text, "pattern", ignore.case = TRUE)expect_length(vector, 10)
expect_type(obj, "list")
expect_s3_class(model, "lm")
expect_s4_class(obj, "MyS4Class")
expect_r6_class(obj, "MyR6Class") # v3.3.0+
expect_shape(matrix, c(10, 5)) # v3.3.0+expect_setequal(x, y) # Same elements, any order
expect_contains(fruits, "apple") # Subset check (v3.2.0+)
expect_in("apple", fruits) # Element in set (v3.2.0+)
expect_disjoint(set1, set2) # No overlap (v3.3.0+)expect_true(condition)
expect_false(condition)
expect_all_true(vector > 0) # All elements TRUE (v3.3.0+)
expect_all_false(vector < 0) # All elements FALSE (v3.3.0+)Each test should contain all setup, execution, and teardown code:
# Good: self-contained
test_that("foofy() works", {
data <- data.frame(x = 1:3, y = letters[1:3])
result <- foofy(data)
expect_equal(result$x, 1:3)
})
# Bad: relies on ambient state
dat <- data.frame(x = 1:3, y = letters[1:3])
test_that("foofy() works", {
result <- foofy(dat) # Where did 'dat' come from?
expect_equal(result$x, 1:3)
})Use withr to manage state changes:
test_that("function respects options", {
withr::local_options(my_option = "test_value")
withr::local_envvar(MY_VAR = "test")
withr::local_package("jsonlite")
result <- my_function()
expect_equal(result$setting, "test_value")
# Automatic cleanup after test
})Common withr functions:
local_options() - Temporarily set optionslocal_envvar() - Temporarily set environment variableslocal_tempfile() - Create temp file with automatic cleanuplocal_tempdir() - Create temp directory with automatic cleanuplocal_package() - Temporarily attach packageWrite tests assuming they will fail and need debugging:
Repeat setup code in tests rather than factoring it out. Test clarity is more important than avoiding duplication.
devtools::load_all() WorkflowDuring development:
devtools::load_all() instead of library()library() calls in testsFor complex output that's difficult to verify programmatically, use snapshot tests. See references/snapshots.md for complete guide.
Basic pattern:
test_that("error message is helpful", {
expect_snapshot(
error = TRUE,
validate_input(NULL)
)
})Snapshots stored in tests/testthat/_snaps/.
Workflow:
devtools::test() # Creates new snapshots
testthat::snapshot_review('name') # Review changes
testthat::snapshot_accept('name') # Accept changesThree approaches for test data:
1. Constructor functions - Create data on-demand:
new_sample_data <- function(n = 10) {
data.frame(id = seq_len(n), value = rnorm(n))
}2. Local functions with cleanup - Handle side effects:
local_temp_csv <- function(data, env = parent.frame()) {
path <- withr::local_tempfile(fileext = ".csv", .local_envir = env)
write.csv(data, path, row.names = FALSE)
path
}3. Static fixture files - Store in fixtures/ directory:
data <- readRDS(test_path("fixtures", "sample_data.rds"))See references/fixtures.md for detailed fixture patterns.
Replace external dependencies during testing using local_mocked_bindings(). See references/mocking.md for comprehensive mocking strategies.
Basic pattern:
test_that("function works with mocked dependency", {
local_mocked_bindings(
external_api = function(...) list(status = "success", data = "mocked")
)
result <- my_function_that_calls_api()
expect_equal(result$status, "success")
})test_that("validation catches errors", {
expect_error(
validate_input("wrong_type"),
class = "vctrs_error_cast"
)
})test_that("file processing works", {
temp_file <- withr::local_tempfile(
lines = c("line1", "line2", "line3")
)
result <- process_file(temp_file)
expect_equal(length(result), 3)
})test_that("output respects width", {
withr::local_options(width = 40)
output <- capture_output(print(my_object))
expect_lte(max(nchar(strsplit(output, "\n")[[1]])), 40)
})test_that("str_trunc() handles all directions", {
trunc <- function(direction) {
str_trunc("This string is moderately long", direction, width = 20)
}
expect_equal(trunc("right"), "This string is mo...")
expect_equal(trunc("left"), "...erately long")
expect_equal(trunc("center"), "This stri...ely long")
})# In tests/testthat/helper-expectations.R
expect_valid_user <- function(user) {
expect_type(user, "list")
expect_named(user, c("id", "name", "email"))
expect_type(user$id, "integer")
expect_match(user$email, "@")
}
# In test file
test_that("user creation works", {
user <- create_user("test@example.com")
expect_valid_user(user)
})Always write to temp directory:
# Good
output <- withr::local_tempfile(fileext = ".csv")
write.csv(data, output)
# Bad - writes to package directory
write.csv(data, "output.csv")Access test fixtures with test_path():
# Good - works in all contexts
data <- readRDS(test_path("fixtures", "data.rds"))
# Bad - relative paths break
data <- readRDS("fixtures/data.rds")For advanced testing scenarios, see:
When working with testthat 3 code, prefer modern patterns:
Deprecated → Modern:
context() → Remove (duplicates filename)expect_equivalent() → expect_equal(ignore_attr = TRUE)with_mock() → local_mocked_bindings()is_null(), is_true(), is_false() → expect_null(), expect_true(), expect_false()New in testthat 3:
Config/testthat/edition: 3)waldo::compare() for better diff outputlocal_mocked_bindings() works with byte-compiled codeInitialize: usethis::use_testthat(3)
Run tests: devtools::test() or Ctrl/Cmd + Shift + T
Create test file: usethis::use_test("name")
Review snapshots: testthat::snapshot_review()
Accept snapshots: testthat::snapshot_accept()
Find slow tests: devtools::test(reporter = "slow")
Shuffle tests: devtools::test(shuffle = TRUE)
© quarto-dev, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 5 other files (references) in .claude/skills/testing-r-packages of quarto-dev/quarto-r.
Open the folder on GitHubat commit bd2329a
We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in quarto-dev/quarto-r, which our catalogue first saw on October 7, 2026.
Testing R Packages next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Testing R Packages this skillquarto-dev/quarto-r | 160 | 1 repos | ~2.8k | Automated safety check: Pass | MIT | |
| Web Application Testinganthropics/skills | 180k | 51 repos | ~966 | Automated safety check: Pass | Apache-2.0 | |
| Diagnosing Bugsfossasia/eventyay-interpretation | 1.6k | 31 repos | ~2.1k | Automated safety check: Pass | Apache-2.0 | |
| TDDfossasia/eventyay-interpretation | 1.6k | 28 repos | ~1.1k | Automated safety check: Pass | Apache-2.0 | |
| TDD WorkflowhellangleZ/burn-in-cceverywhere-ralph | 112 | 11 repos | ~2.4k | Automated safety check: Pass | None | |
| TDDsanity-io/sanity | 6.4k | 20 repos | ~1k | Automated safety check: Pass | MIT |
anthropics/skills
Tests local web applications with Python Playwright scripts, checking frontend behavior, capturing screenshots and reading browser console logs.
fossasia/eventyay-interpretation
Diagnosis loop for hard bugs and performance regressions. An agent skill from fossasia/eventyay-interpretation.
fossasia/eventyay-interpretation
Test-driven development. An agent skill from fossasia/eventyay-interpretation.
hellangleZ/burn-in-cceverywhere-ralph
A skill your agent uses when writing new features, fixing bugs, or refactoring code.
sanity-io/sanity
Test-driven development with red-green-refactor loop. An agent skill from sanity-io/sanity.
Ibrahim-3d/orchestrator-supaconductor
A skill your agent uses when working with Conductor's context-driven development methodology, managing project context artifacts, or understanding the relationship between product.md, tech-stack.md…
quarto-dev/quarto-r
Create professional package release blog posts following Tidyverse or Shiny blog conventions.
quarto-dev/quarto-r
Create a release checklist and GitHub issue for an R package.
quarto-dev/quarto-r
Generate and improve accessible alt text for data visualizations and images in R packages and Quarto documents.
quarto-dev/quarto-r
Comprehensive R package for command-line interface styling, semantic messaging, and user communication.
quarto-dev/quarto-r
A skill your agent uses when the user is explicitly working with Quarto, .qmd files, quarto.yml, Quarto projects, or Quarto features such as callouts, cross-references, citations, Mermaid diagrams…
quarto-dev/quarto-r
Prepare R packages for CRAN submission by checking for common ad-hoc requirements not caught by devtools::check().
Categories
Best practices for writing R package tests using testthat version 3+. Testing R Packages is an agent skill from quarto-dev/quarto-r. Best practices for writing R package tests using testthat version 3+.
Testing R Packages fits situations like: improving tests for R packages.
Run `npx skills add quarto-dev/quarto-r --skill testing-r-packages -a claude-code`. Or copy the skill folder (.claude/skills/testing-r-packages in quarto-dev/quarto-r) into .claude/skills/testing-r-packages in your project. Claude Code loads it when a task matches its description.
Run `npx skills add quarto-dev/quarto-r --skill testing-r-packages -a codex`. Or copy the skill folder (.claude/skills/testing-r-packages in quarto-dev/quarto-r) into .agents/skills/testing-r-packages in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add quarto-dev/quarto-r --skill testing-r-packages -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/testing-r-packages, .gemini/skills/testing-r-packages, .github/skills/testing-r-packages and .opencode/skills/testing-r-packages in your project.
SKILL.md names no scripts, command-line tools or credentials: Testing R Packages is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Testing R Packages is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 8.8k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Testing R Packages: Web Application Testing (anthropics/skills, 180k stars), Diagnosing Bugs (fossasia/eventyay-interpretation, 1.6k stars), TDD (fossasia/eventyay-interpretation, 1.6k stars) and TDD Workflow (hellangleZ/burn-in-cceverywhere-ralph, 112 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
quarto-dev (a GitHub organization) maintains it in quarto-dev/quarto-r, which has 160 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on September 10, 2026.
Source: quarto-dev/quarto-r on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.