run_crash_test | R Documentation |
Function required to perform crash test for a Shiny app. Test whether the app starts and whether it stays alive after a series of random clicks (monkey test) or targeted actions.
run_crash_test(
headless_actions = NULL,
timeout = NULL,
port = randomPort(max = 3500),
...
)
headless_actions |
Custom code passed as an expression to manipulate the app with headless
web browser, for instance
|
timeout |
Time to wait after starting the subprocess (s). Useful is you know how much time the app takes to load. Defaults to 10 seconds locally and 20 seconds on CI/CD. |
port |
Port to start the app, default to |
... |
Pass extra parameters to run_app_audit. This is useful if you work with packages like golem. |
Errors if any of the step fails.
If the Shiny app takes time to load, you may pass load_timeout parameter with duration in ms. For instance load_timeout = 5000, would wait 5 seconds.
## Not run:
# Assuming run_app_audit is defined ...
run_crash_test(
headless_actions = {
app$set_inputs(obs = 1000)
app$get_screenshot("./plop.png")
}
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.