tests/testthat/test-app-quarto.R

test_that("Quarto documents can be tested", {
  skip_if_no_apps()

  app <- AppDriver$new(test_path("apps/qmd"), seed = 68850)

  app$set_inputs(name = "barret")
  app$click("greet")
  app$expect_values()

  expect_equal(
    app$get_value(output = "greeting"),
    "Hello barret!"
  )
})

Try the shinytest2 package in your browser

Any scripts or data that you put into this service are public.

shinytest2 documentation built on Jan. 10, 2026, 1:07 a.m.