Can not use shinytest for larger application


#1

Hello, I need to test my shiny application so I have downloaded shinytest and followed this tutorial - https://www.rstudio.com/resources/webinars/testing-shiny-applications-with-shinytest/ .

When I run recordTest() on a small application, it works fine. But I have a big application that I need to create tests for and I can not run recordTest() above this application. It outputs the following lines:

Error in sd_startShiny(self, private, path, seed) : 
  Cannot find shiny port number. Error:
Running application in test mode.
Loading required package: shiny

Attaching package: 'dplyr'

The following objects are masked from 'package:stats':

    filter, lag

The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union

Loading required package: Hmisc
Loading required package: lattice
Loading required package: Formula

Attaching package: 'Hmisc'

The following objects are masked from 'package:dplyr':

    src, summarize

The following objects are masked from 'package:base':

    format.pval, units

Loading required package: SparseM

Attaching package: 'SparseM'

The following object is masked from 'package:base':

    backsolve


Attaching package: 'rms'

The following object is masked from 'package:shiny':

    validate

Loading required package: ggpubr
Loading required package: magrittr
Warning: package 'compareGroups' was built under R version 3.4.4
Loading required package: gdata
gdata: Unab

My application needs to be tested is quite big. It connects to database, retrieves data from database, sources many files. In lines printed above you can clearly see from the last line that it probably timeouts. gdata: Unab - probably it was meant Unable ....

I saw people dealing with this here - https://github.com/rstudio/shinytest/issues/111 - but there is no clear answer how to fix that.

Thank you for any help.


#2

What happens when you suppress the package load messages (suggested in the issue you linked to)?


#3

@EconomiCurtis I have already fixed it. Check the last comments here https://github.com/rstudio/shinytest/issues/111 and you will see how. Thanks anyway!


#4

If your question's been answered, would you mind choosing a solution (even if it's just your post with the reference to the issue)? (see FAQ below for how) It makes it a bit easier to visually navigate the site and see which questions still need help.

Thanks


#5

Sure. I was looking for a button but could not find. Now I see it ;). Thanks


#6

Yeah— it's kinda hidden, that's why I made that little pictorial!