Using shinytest for automated testing of several apps in one package

I am trying to use shniytest to automatically test a couple of app examples in the examples directory of my package and I am running into problems. I will give an easy example which should show the essence of the problem.
We have the following file structure:


The files are of the following form:


ui <- fluidPage()
server <- function(input, output, session) {}
shinyApp(ui, server)




app <- ShinyDriver$new("../../app/")

Furethermore, the package shinytest is attached.
If I run now "runTests()" in the cosole I get the error:

Error in shinytest.R
Error in findTestsDir(appDir, quiet = FALSE): tests/ directory doesn't exist

Error: Shiny App Test Failures detected in
* ./tests/shinytest.R

If I put app.R out of the directory app, i.e. change the directory structure to


and adapt the paths in shinytest.R and mytest.R to the new structure, runTests works smoothly without error. But this is not what I need since I want to test several examples in the examples directory of my package.

I use shinytest 1.4.0, shiny 1.5.0, testthat 2.3.2, R version 3.6.3 on Pop!_OS Linux.

Any advice or suggestions how to make my example running are highly appreciated.

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.