Barret Schloerke of RStudio this week offered Shiny developers details of the R package, which promises to improve testing for R Shiny applications. shinytest2 version 0.1.0, of CRAN from Wednesday allows automated testing of the interactivity of the web application Shiny. This testing is done through lamenessChrome headless browser.
During a presentation at the Shiny conference sponsored by Appsilon consultants, Schloerke showed the package to online participants
record_test() function. As the name suggests, this feature records actions taken in the test browser and converts those actions into code. This code can then automatically restart the user’s initial manual activities and check the results. Under the hood shinytest2 takes some snapshots of the status of the application and uses test this package for a single test to store different values over time. When the test is restarted, the new values can be compared with the earlier ones.
For more information on shinytest2, see package website.
Also this week, the host of the Appsilon conference revealed theirs Rhino frame for building Shiny applications, which the company advertises as allowing the creation of applications “as a full-stack software engineer”, according to website for packages. “Apply software engineering best practices, modulate your code, test it well, make the UI beautiful and think about accepting users from the start. Rhino is a confident framework with a focus on software engineering practices and development tools.
Rhino includes built-in support for modular testing, end-to-end testing with Cypress, linting, GitHub Action CI, dependency management and more.
Rhino is a new alternative to the current popular framework golemwhich was created by the consulting company ThinkR R. One of the main differences between the two is that golem requires the Shiny application to be created as an R package, while Rhino does not. Appsilon officials said that for some of their work with clients, they need the option to create an application that is not structured as a package, as this offers more flexibility in terms of file structure. There was a lively discussion in the conference chat about the merits of requiring Shiny applications to be R packets, with some liking the portability and well-known structure of the packet, while others preferred the concept of more choice.
Rhino is “another promising entry into the growing set of developer-friendly tools positioned to set you up for success in building high-quality Shiny applications,” said Eric Nanz, host of Shiny Developer Series podcast and a statistician at the Fortune 500 Life Sciences Company in his day-to-day work. He said he had used golem extensively for Shiny’s production applications, but was intrigued by the hybrid Rhino framework’s “mixed directory structure and namespace management through the box package.”
Videos of many of the conference presentations should be available soon at YouTube channel of Appsilon.
In the main panel closing the conference, RStudio CTO Joe Cheng was asked about the most interesting recent developments at Shiny. “We have some incredibly cool things we can’t talk about,” Cheng said, calling them “a bunch of secrets that aren’t ready for public disclosure.” Asked by Shiny Developer Series host Eric Nanz if some of this work could be revealed to rstudio :: conf 2022Cheng said it was likely. RStudio’s annual conference will be held July 25-28 in Washington, DC, and online.
If you want tips on how to get the most out of R, go to InfoWorld’s Do More With R page with links to more than 50 articles and tutorials.
Copyright © 2022 IDG Communications, Inc.