Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add interactive mode for debugging (OSOE-634) #281

Closed
sarahelsaig opened this issue May 24, 2023 · 3 comments · Fixed by #300
Closed

Add interactive mode for debugging (OSOE-634) #281

sarahelsaig opened this issue May 24, 2023 · 3 comments · Fixed by #300
Assignees
Labels
enhancement New feature or request

Comments

@sarahelsaig
Copy link
Member

sarahelsaig commented May 24, 2023

An updated copy of my original post on Teams:

Back when the UI tests started the web app in a separate process, it was possible to just drop a breakpoint in your code and do stuff in the browser window interactively, because the program was still running. So you could still look around on other pages, inspect the current state of the admin dashboard, etc. It was only needed occasionally but then it was incredibly useful in debugging problems that crop up during UI tests.

Right now this is not possible. Currently the only hack where I can approximate this effect is by adding something like await Task.Delay(120000); before the line where I'd like to "break", and then I have 2 minutes to look around in another tab but that's super inconvenient.

I'd like to have the ability to switch into an interactive mode programmatically, similar to how you can switch into debug mode with Debugger.Break(). I envision a separate module that stores a mode state and exposes an MVC action for a UI to leave interactive mode and continue operation. This module would be added to the webapp just like the Shortcuts module now. And an await context.SwitchToInteractiveAsync() extension method that updates the mode, opens this action in a new tab and then waits until the state is restored, e.g. via task cancellation.

Jira issue

@sarahelsaig sarahelsaig added the enhancement New feature or request label May 24, 2023
@github-actions github-actions bot changed the title Add interactive mode for debugging Add interactive mode for debugging (OSOE-634) May 24, 2023
@Piedone
Copy link
Member

Piedone commented Jul 27, 2023

We don't really need a separate module for this, it can be part of Shortcuts.

Having a new tab open with a button like "Exit interactive mode" would be beautiful, though I think even having a URL that you open that quits interactive mode would be sufficient.

@sarahelsaig sarahelsaig self-assigned this Jul 28, 2023
@sarahelsaig
Copy link
Member Author

I'm doing both. Visually it will open the tab like
image
but you can also directly navigate to ~/Lombiq.Tests.UI.Shortcuts/InteractiveMode/Continue to get the same effect.

@Piedone
Copy link
Member

Piedone commented Jul 30, 2023

Looks awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants