Shinytest2
No description available
Install / Use
/learn @rstudio/Shinytest2README
shinytest2 <a href="https://rstudio.github.io/shinytest2/"><img src="man/figures/logo.svg" align="right" height="139" /></a>
<!-- badges: start --> <!-- badges: end -->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
# Install the released version from CRAN
install.packages("shinytest2")
# Or the development version from GitHub:
# install.packages("devtools")
devtools::install_github("rstudio/shinytest2")
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.
Please check out our Getting Started article for example usage.
Related Skills
node-connect
344.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
96.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.1kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
