Skip to content

Idea: To debug a failing test, be able to "browse()" into the app #85

Open

Description

@daattali

Related to #26

If a regular unit test (outside of shiny) fails, an easy way to debug it is to put a browse() statement just before the offending line, so that you can see exactly what the state is.

It would be great to be able to replicate that behaviour when testing shiny apps. One idea is to let you launch the app in a "spectator" mode where the app actually launches in a proper browser with UI, and you can click a button to say "run the next command in the test script" or inspect the state of everything. Another idea is to be able to place a shinytest::browse_app() command inside the test script, and when this command is reached then the app is launched and lets the user see the current state.

Perhaps this is too ambitious :)

Activity

  1. added
    chromium 📺
    feature
    on Aug 8, 2020
  2. warnes commented on Aug 13, 2020

    @warnes

    Another option, perhaps simpler?, would be to run the shiny app in the main RStudio UI, even though the client is running in a headless slave process. This way one could set breakpoints etc to debug the app while the test script executes.

    Failing that, could we at least get a traceback in the error response?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    chromium 📺feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions