Learn R Programming

shinytest

NOTE: shinytest is deprecated and may not work with Shiny after version 1.8.1, which was released on 2024-04-02. This is because it is based on a headless browser, PhantomJS, which was last released on 2016-01-24 and is no longer being developed. Going forward, please use shinytest2, which makes use of headless Chromium-based browsers. See the shinytest to shinytest2 Migration Guide for more information.

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

6,870

Version

1.6.1

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Winston Chang

Last Published

May 30th, 2024

Functions in shinytest (1.6.1)

ShinyDriver

Remote control a Shiny app running in a headless browser
migrateShinytestDir

Migrate legacy shinytest files to new test directory structure
expect_pass

Expectation: testApp() passes snapshot tests
diffviewer_widget

Creat an htmlwidget that shows differences between files or directories
expectUpdate

testthat expectation for a Shiny update
recordTest

Launch test event recorder for a Shiny app
osName

Get the name of the OS
Widget

A Shiny Widget
dependenciesInstalled

Checks for/installs dependencies
registerInputProcessor

Register an input processor for the test recorder
viewTestDiff

View differences in test results
viewTestDiffWidget

Interactive viewer widget for changes in test results
shinytest-package

shinytest: Test Shiny Apps
testApp

Run tests for a Shiny application
snapshotCompare

Compare current and expected snapshots
textTestDiff

Get textual diff of test results