-
Notifications
You must be signed in to change notification settings - Fork 12
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
Helper code and files for your testthat tests - R-hub blog #138
Comments
Thanks for nicely filling up the missing part in our earlier discussion. One point I am missing: I have tests that have to be run manually, because they are integration tests for an API hitting a live server. I add these as sibblings of
Using I put the testdata shared between unit-test and integration tests in another sibbling directory. Any comments or better ideas? |
Thanks for reading! I think it sounds ok? In the Whole Games section of https://books.ropensci.org/http-testing/ I suggest some workflows for tests with real requests but yours seems to work 🙂 |
Aside question, what does your package do compared to https://docs.ropensci.org/ruODK/? |
It is a complement to ruODK, which I also use. ruODK is focused on getting the data for offline-reading. odkapi is strict REST API, using XSLT for conversion of all output to data frames. And it is lean, using no tidyverse. I am not ideologically opposed to tidyverse and use it every day writing fire-and-forget reports, but I have three package (breathtestXXX, gastempt) that use it, and the amount of work I put into keeping up with tidyverse changes is just to massive. 75% tidyverse problems, 20% rstan/rcpp. I use it to build a highly simplified form upload/test RGui for clinical use. The official Web Interface one is highly confusing for end users and will never pass usage tests in a clinical context. Even if I use it the web interface daily, I never find the place where to get the test or the user QR code. Or been thrown back to rename the form when I upload it . Or the confusing warning that cannot be switched off that the repeat behaviour has changed. |
Which I clearly have read.... Since I had used httptest before, I sticked with it, even if you prefer vcr and friends. |
The http testing book is getting updated, I added a chapter about httptest yesterday 😉 |
Bummer -- when do you have time to do your real work .:) |
I stumbled upon this post again while reading https://ropensci.org/blog/2023/07/21/news-july-2023/#package-development-corner. Would you say that the statement
is still true? These helper files are mentioned, without any mention of them being deprecated, in a somewhat new testthat vignette (r-lib/testthat#1769): https://testthat.r-lib.org/articles/special-files.html#helper-files |
I think they'll be supported forever but I'm not sure they're recommended? I use them a lot in any case. 😅 |
Helper code and files for your testthat tests - R-hub blog
https://blog.r-hub.io/2020/11/18/testthat-utility-belt/
The text was updated successfully, but these errors were encountered: