Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce integration testing framework #2682

Merged
merged 13 commits into from Oct 30, 2019
Merged

Introduce integration testing framework #2682

merged 13 commits into from Oct 30, 2019

Conversation

@trestletech
Copy link
Contributor

@trestletech trestletech commented Oct 24, 2019

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 testModule and testServer which 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 testServer and testModule and 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.

@trestletech trestletech requested a review from wch Oct 24, 2019
.gitignore Outdated Show resolved Hide resolved
R/test-module.R Outdated Show resolved Hide resolved
R/test-module.R Outdated Show resolved Hide resolved
R/test-module.R Outdated Show resolved Hide resolved
trestletech added 8 commits Oct 25, 2019
(More to come in subsequent PR)
@@ -89,7 +90,9 @@ Suggests:
ggplot2,
reactlog (>= 1.0.0),
magrittr,
yaml
yaml,
future,

This comment has been minimized.

@wch

wch Oct 30, 2019
Collaborator

These packages aren't needed anymore, right?

This comment has been minimized.

@trestletech

trestletech Oct 30, 2019
Author Contributor

They're still used in test-test-module, actually.

@wch
wch approved these changes Oct 30, 2019
Copy link
Collaborator

@wch wch left a comment

Just one thing with the Suggested packages; otherwise looks good!

@trestletech trestletech merged commit 67a66fd into master Oct 30, 2019
4 of 5 checks passed
4 of 5 checks passed
continuous-integration/travis-ci/push The Travis CI build is in progress
Details
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details
@trestletech trestletech deleted the jeff/int-test branch Oct 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.