Test Shiny Apps

For automated testing of Shiny applications, using a headless browser, driven through 'WebDriver'.


Linux Build Status Windows Build status CRAN RStudio mirror downloads

Installation

To install the current release version:

install.packages("shinytest")

To install the development version:

devtools::install_github("rstudio/shinytest")

Usage

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

License

MIT © Mango Solutions, RStudio

News

1.3.1

New features

  • Added support for setting inputs that do not have an input binding (#232); furthermore, inputs set with event priority (e.g., Shiny.setInputValue('key', 'value', {priority: 'event'})) are also supported (#239).

  • Added support for triggering snapshots from the keyboard (by pressing Ctrl-Shift-S or Command-Shift-S) while recording tests with recordTest() (#240).

  • recordTest() gains a debug argument for displaying ("shiny_console", "browser", and/or "shinytest) logs into the R console (#146). When these logs are displayed, they use format.shinytest_logs() with short = TRUE which suppress the timestamp and level.

Bug fixes

  • Recording a test that produces an input value with an escape character, '', no longer results in error (#241).

Improvements

  • ShinyDriver now passes the current RNGkind() to the background R process that serves up the app being tested. This allows for better control over randomness across mutliple versions of R with different RNGkind() defaults (e.g., 3.5 and 3.6)

1.3.0

  • First public release

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("shinytest")

1.3.1 by Winston Chang, 2 months ago


https://github.com/rstudio/shinytest


Report a bug at https://github.com/rstudio/shinytest/issues


Browse source code at https://github.com/cran/shinytest


Authors: Winston Chang [aut, cre] , Gábor Csárdi [aut]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports assertthat, digest, crayon, debugme, parsedate, pingr, callr, R6, rematch, httr, shiny, testthat, utils, webdriver, htmlwidgets, jsonlite, withr, httpuv, rstudioapi

Suggests rmarkdown, flexdashboard

System requirements: PhantomJS (http://phantomjs.org/)


Imported by BayesianNetwork, eAnalytics.

Suggested by MtreeRing, codebook, colocr, crunchy, dqshiny, evaluator, jsmodule, plotly, r2d3, safetyGraphics, spotGUI.


See at CRAN