# install.packages('pak')
::pak('mjfrigaard/shinypak')
paklibrary(shinypak)
Tests
Expand the callout boxes below to review what we’ve covered in the previous chapters on debugging:
Testing your app
We’re now ready to test the code and features in our app-package. The next section covers the following topics:
Test suite
Test suite starts by showing how to create the testthat
infrastructure then, dives into creating test files, the mechanics unit tests and expectations, and running tests during development
This chapter also introduces keyboard shortcuts for testing and testthat
’s behavior-driven development functions:
Specifications
Specifications discusses how to collect and organize information to write tests for your application:
15.1.2 Features, and
This chapter also gives examples of behavior-driven development tests features and how to track specifications and tests together:
Test tools
This chapter introduces:
Each tool can contribute to testing your Shiny app-package in a unique way (they’re also relatively recent additions to the testthat
framework)
Testing modules
Shiny’s testServer()
function can be useful for performing integration tests with module server functions. Testing modules gives examples of using testServer()
to verify module communication (i.e., passing data between modules):
System tests
The final chapter in this section covers setting up and running system (or end-to-end tests with shinytest2
):