{shinytest2}: Unit testing for Shiny applications
summary
shinytest2 provides regression testing for Shiny apps by driving a headless Chrome via chromote and integrating with testthat; recorded interactions (using record_test / AppDriver) become runnable tests that execute in seconds and replay a 10‑second manual session. Prior shinytest (PhantomJS) enters maintenance mode so existing screenshots break; shinytest2 lets you open a live Chrome view and use DevTools to debug failing runs. Advice: export reactive values, avoid brittle screenshot assertions, prefer explicit expectations.
AI-written summary · about
chapters (8)
- 0:00Introduction to app testing
- 1:10The challenges of manual testing
- 2:59Introduction to testthat
- 6:12Overview of shinytest2
- 8:33Building a shinytest2 example
- 11:02Recording tests effectively
- 12:55Debugging with live views
- 14:35Best practices and conclusion
related talks
18m{shinytest2}: Unit testing for Shiny applications
15mA Robust Framework for Automated Shiny App Testing
19mGetting it right: Writing reliable and maintainable R code
20mOld Apps, New Tricks: How AI can write Automated Tests for your Shiny Apps
37mFront-end Testing for Skeptics
19mWorking Well: The Future of Web Testing
27mWhat To Expect When You're Expecting: A guide to Regression Testing
37mAdvanced Test Automation Techniques for Responsive Apps and Sites
