Skip to content

kierisi/shinytest2

 
 

Repository files navigation

shinytest2

CRAN status R-CMD-check Lifecycle: experimental

🚩🚩
{shinytest2} is in beta developement.
Please report any bugs or feedback at https://github.com/rstudio/shinytest2/issues
🚩🚩

Manually testing Shiny applications is often laborious, inconsistent, and doesn’t scale well. Whether you are developing new features, fixing bug(s), or simply upgrading dependencies on a serious app where mistakes have real consequences, it is critical to know when regressions are introduced. {shinytest2} provides a streamlined toolkit for unit testing Shiny applications and seamlessly integrates with the popular {testthat} framework for unit testing R code.

{shinytest2} uses {chromote} to render applications in a headless Chrome browser. {chromote} allows for a live preview, better debugging tools, and/or simply using modern JavaScript/CSS.

By simply recording your actions as code and extending them to test the more particular aspects of your application, it will result in fewer bugs and more confidence in future Shiny application development.

Installation

You can install the development version of {shinytest2} from GitHub with:

remotes::install_github("rstudio/shinytest2")

Please check out our Getting Started article for example usage.

Usage

The easiest way to get started is by calling shinytest2::record_test() in your app directory. This will open a Shiny application to record your actions as code. To programmatically create a test, call shinytest2::use_shinytest2_test().

Call shinytest2::use_shinytest2() to create a initial value test file and set up any other infrastructure you may need.

About

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • R 90.3%
  • JavaScript 7.7%
  • CSS 1.5%
  • HTML 0.5%