rstudio / shinytest

Automated testing for shiny apps
https://rstudio.github.io/shinytest/
Other
225 stars 55 forks source link

Reduce random test failures #359

Open hadley opened 4 years ago

hadley commented 4 years ago

Like:

Error: argument is of length zero
Backtrace:
    █
 1. └─ShinyDriver$new(test_path("apps/embedded-tabs")) test-tabs.R:19:2
 2.   └─.subset2(public_bind_env, "initialize")(...)
 3.     └─shinytest:::sd_initialize(...)
 4.       └─private$web$executeScript(js)
 5.         └─webdriver:::session_executeScript(self, private, script, ...)
 6.           └─private$makeRequest("EXECUTE SCRIPT", list(script = script, args = args))
 7.             └─webdriver:::session_makeRequest(...)
 8.               └─httr::POST(url, add_headers(.headers = headers), body = json)
 9.                 └─httr:::request_perform(req, hu$handle$handle)

This doesn't happen every time, but it happens frequently enough to cause the overall GHA action to fail, making it harder to tell whether a PR really breaks the build or not. I'd recommend that the next person to work on shinytest prioritise this issue.