You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context
When I run my shiny app in R Studio Server (linux), in my console I see all the custom logging statements from my server.R script, and, importantly, the error that caused the app to crash (i.e. "Column ExitAdjust doesn't exist"):
Brief explanation of how the app works
The user uploads a zip file, which the app then processes in sequential steps, beginning with the "Running get export" step, then "Running dates", ..., then "Running initial data prep". (There are actually a few more steps that are supposed to run after that, but the app is crashing during that last step because I'm trying to select() a column (ExitAdjust) from a dataframe that doesn't contain that column. That's all expected behavior - the app should crash!
My Issue
How do I get shinytest2 to reflect that same error? When I run my test, I don't see the error in the console. Instead, I get something like this:
Relevant code behind the test:
test_that(paste0("{shinytest2} recording: ",test_script_name), {
print(paste0("Running ",test_script_name))
app <- AppDriver$new(
variant = platform_variant(os_name = FALSE),
name = test_script_name,
seed = 12345,
load_timeout = 1e+05)
app$set_inputs(Go_to_upload = "click")
app$upload_file(imported = paste0("../",test_dataset))
app$expect_values() # FAILS HERE BECAUSE APP HASN'T FINISHED PROCESSING BECAUSE OF THE AFOREMENTIONED ERROR
})
The test is opening the app, going to the page where the file gets uploaded, uploading the file, then trying to take a snapshot. Unsurprisingly, the test fails trying to take the snapshot because the app never finishes processing the uploaded file due to the aforementioned error. Unfortunately, though, the log isn't very helpful. I.e., it's not clear WHY the app is failing.
What should happen
Ideally, it would print all the same stuff as when I run the app regularly, but especially the error message.
What I've tried
I've tried the following things, but saw no changes in the log:
Add to my app initialization: options = list(shiny.trace = TRUE, shiny.fullstacktrace = TRUE)
Add to my app initialization: options = list(shiny.trace = TRUE)
Add below my app initialization: app$get_logs()
The text was updated successfully, but these errors were encountered:
Context
When I run my shiny app in R Studio Server (linux), in my console I see all the custom logging statements from my server.R script, and, importantly, the error that caused the app to crash (i.e. "Column
ExitAdjust
doesn't exist"):Brief explanation of how the app works
The user uploads a zip file, which the app then processes in sequential steps, beginning with the "Running get export" step, then "Running dates", ..., then "Running initial data prep". (There are actually a few more steps that are supposed to run after that, but the app is crashing during that last step because I'm trying to
select()
a column (ExitAdjust
) from a dataframe that doesn't contain that column. That's all expected behavior - the app should crash!My Issue
How do I get shinytest2 to reflect that same error? When I run my test, I don't see the error in the console. Instead, I get something like this:
Relevant code behind the test:
The test is opening the app, going to the page where the file gets uploaded, uploading the file, then trying to take a snapshot. Unsurprisingly, the test fails trying to take the snapshot because the app never finishes processing the uploaded file due to the aforementioned error. Unfortunately, though, the log isn't very helpful. I.e., it's not clear WHY the app is failing.
What should happen
Ideally, it would print all the same stuff as when I run the app regularly, but especially the error message.
What I've tried
I've tried the following things, but saw no changes in the log:
options = list(shiny.trace = TRUE, shiny.fullstacktrace = TRUE)
options = list(shiny.trace = TRUE)
app$get_logs()
The text was updated successfully, but these errors were encountered: