https://github.com/MayaGans/testthat_example
Using Test That with Shiny
https://github.com/MayaGans/testthat_example
Last synced: 4 months ago
JSON representation
Using Test That with Shiny
- Host: GitHub
- URL: https://github.com/MayaGans/testthat_example
- Owner: MayaGans
- Created: 2020-02-14T19:20:11.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-17T01:13:26.000Z (about 5 years ago)
- Last Synced: 2024-11-10T21:46:22.802Z (5 months ago)
- Language: R
- Size: 15.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - MayaGans/testthat_example - Using Test That with Shiny (R)
README
# Using testthat and shinytest with Shiny
Simple Shiny app to create two tests: (1) one for just simple text printing correctly, and another (2) where a dataframe is being filtered based on a numeric input value [the test is to make sure the filtered table matches the expected table].
##### TEST FOLDER:
- [X] Test one is very basic, making sure a string is the expected string
- [X] Test two requires turning a `renderTable` output from an HTML string into a dataframe, then we can compare that dataframe to our expected output.##### QUESTIONS
- How should the folder be structured?
- Does each test belong in its own file (as I have it)?
- Do you create families of tests in their own files?
- What exactly IS "context"
- Once organized, how do you "run all tests"? (right now I just ran the contents of test_1 and then test_2. This seems wrong)
- Tests that don't error follow the silence is golden rule. When the user can "run all tests" is there a way to print the test name and "passed" for the tests that pass, and not just show errors?