Run tests for a Shiny application
testApp(appDir = ".", testnames = NULL, quiet = FALSE,
compareImages = TRUE, interactive = base::interactive())
Path to the Shiny application to be tested.
Test script(s) to run. The .R extension of the filename is
optional. For example, "mytest"
or c("mytest", "mytest2.R")
.
If NULL
(the default), all scripts in the tests/ directory will be
run.
Should output be suppressed? This is useful for automated testing.
Should screenshots be compared? It can be useful to set
this to FALSE
when the expected results were taken on a different
platform from the one currently being used to test the application.
If there are any differences between current results and expected results, provide an interactive graphical viewer that shows the changes and allows the user to accept or reject the changes.
snapshotCompare
and snapshotUpdate
if
you want to compare or update snapshots after testing. In most cases, the
user is prompted to do these tasks interactively, but there are also times
where it is useful to call these functions from the console.