Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upIntroduce integration testing framework #2682
Merged
Conversation
| @@ -89,7 +90,9 @@ Suggests: | |||
| ggplot2, | |||
| reactlog (>= 1.0.0), | |||
| magrittr, | |||
| yaml | |||
| yaml, | |||
| future, | |||
wch
Oct 30, 2019
Collaborator
These packages aren't needed anymore, right?
These packages aren't needed anymore, right?
trestletech
Oct 30, 2019
Author
Contributor
They're still used in test-test-module, actually.
They're still used in test-test-module, actually.
|
Just one thing with the Suggested packages; otherwise looks good! |
67a66fd
into
master
4 of 5 checks passed
4 of 5 checks passed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
This PR introduces an integration testing framework that facilitates the testing of reactives inside of a Shiny server function or a Shiny module. The two entry-points are
testModuleandtestServerwhich take a module or a shiny application object, respectively.The vignette included in this PR best captures the functionality and how to use this. The initial version is published here: https://beta.rstudioconnect.com/content/6874/integration-testing.html
Intentionally omitted from this PR is any inline documentation on these new functions or their associated objects. I'm still debating whether this would be best served by an article in the dev center, something roxygenized, more vignettes, or some combination. I'll start work on how to document and expose this stuff next. (Preview)
Validation
This PR finally surfaces some of the internal work that we've been doing for a few weeks now. So there's a little more surface area that we could test here. However, any edge cases that we've discovered around weird reactivity or timing issues are already covered in unit tests, so I don't think there will be too much exploring required.
Take a look at
testServerandtestModuleand pass in a few applications or modules as discussed in the vignette (linked above). If everything there works, I think we may be good for now. Once the documentation for all this lands, I'll want to get more feedback on usability and approachability, but that's intentionally omitted right now.