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

Unit tests #6

Closed
rgiordan opened this issue Oct 19, 2017 · 3 comments
Closed

Unit tests #6

rgiordan opened this issue Oct 19, 2017 · 3 comments

Comments

@rgiordan
Copy link

This issue is for openjournals/joss-reviews#425

There doesn't seem to be an automated way to test whether the shiny app is working as expected. It seems to me that it would be good to have some tests to check, for example, for breaking changes to the shiny or bnlearn API.

I appreciate that it's not always easy to test web interfaces, and I'm not sure what would be best -- I haven't developed in shiny myself! But I did find RSelenium, which says that solutions are out there.

@paulgovan
Copy link
Owner

Agreed. Unit tests are difficult in shiny, but recently the shinytest package was released, which looks like a possible solution. This may take a while, but I'll work to incorporate tests in the package.

@paulgovan
Copy link
Owner

paulgovan commented Oct 30, 2017

Ok I've added tests for the app's basic functionality via the shinytest package. shinytest is still under development, so the dev version must be installed from GitHub:

devtools::install_github("rstudio/shinytest")

To run the tests, navigate to the package directory and run:

shinytest::testApp("inst/bn")

There may be some slight differences between some of the image snapshots due to the randomness of the d3 graphics, but the tests should pass otherwise.

@paulgovan
Copy link
Owner

paulgovan commented Dec 3, 2017

Ok I've integrated testing with travis as of commit d53283c. Note that this testing framework is still under development, and I will be looking to add more details in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants