Learn R Programming

⚠️There's a newer version (1.6.1) of this package.Take me there.

shinytest

NOTE: shinytest is currently in maintenance mode. It is based on a headless browser, PhantomJS, which is no longer being developed. Going forward, please use shinytest2, which makes use of headless Chromium-based browsers.

shinytest provides a simulation of a Shiny app that you can control in order to automate testing. shinytest uses a snapshot-based testing strategy: the first time it runs a set of tests for an application, it performs some scripted interactions with the app and takes one or more snapshots of the application’s state. Subsequent runs perform the same scripted interactions then compare the results; you'll get an error if they're different.

Installation

To install the current release version:

install.packages("shinytest")

Usage

See the getting started guide to learn how to use shinytest.

Copy Link

Version

Install

install.packages('shinytest')

Monthly Downloads

5,065

Version

1.5.4

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Winston Chang

Last Published

March 2nd, 2024

Functions in shinytest (1.5.4)

viewTestDiffWidget

Interactive viewer widget for changes in test results
testApp

Run tests for a Shiny application
textTestDiff

Get textual diff of test results
viewTestDiff

View differences in test results
shinytest-package

shinytest: Test Shiny Apps
snapshotCompare

Compare current and expected snapshots
migrateShinytestDir

Migrate legacy shinytest files to new test directory structure
recordTest

Launch test event recorder for a Shiny app
expectUpdate

testthat expectation for a Shiny update
Widget

A Shiny Widget
ShinyDriver

Remote control a Shiny app running in a headless browser
expect_pass

Expectation: testApp() passes snapshot tests
diffviewer_widget

Creat an htmlwidget that shows differences between files or directories
osName

Get the name of the OS
dependenciesInstalled

Checks for/installs dependencies
registerInputProcessor

Register an input processor for the test recorder