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

Consider using a terminal for test output #119642

Closed
Tyriar opened this issue Mar 23, 2021 · 4 comments
Closed

Consider using a terminal for test output #119642

Tyriar opened this issue Mar 23, 2021 · 4 comments
Assignees
Labels
feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders testing Built-in testing support verification-needed Verification of issue is requested verification-steps-needed Steps to verify are needed for verification verified Verification succeeded
Milestone

Comments

@Tyriar
Copy link
Member

Tyriar commented Mar 23, 2021

Testing #119545

You can create a terminal using hideFromUser: true so that it's not visible until the user opens it (notification on failure? button on test view?) and then use waitOnExit: string to reuse a terminal with a message like tasks does.

The main benefit here would be better sequence support like colors and moving the cursor (eg. animated loading bars).

@connor4312
Copy link
Member

Test output is on my todo for next month. I would prefer to manage output centrally in the test APIs and would prefer that extensions don't go and create their own terminals, so that the test UI and settings can control visibility in a consistent way. (e.g. settings to show the terminal on test failure)

My initial thought has been to add some output method on the TestRun which would give data to VS Code to store. Then, on a reveal action, we would show the captured output in a terminal or an editor. A terminal is good for automatic handling of control sequences, but we also won't necessarily know its size.

@Tyriar
Copy link
Member Author

Tyriar commented Mar 23, 2021

@connor4312 yes the core would still manage the terminal, it's just used instead of an output channel.

A terminal is good for automatic handling of control sequences, but we also won't necessarily know its size.

I don't think the size is much of an issue for tests, at least not on Windows as soft wraps are sent. For Windows we need #91898 to behave better.

@connor4312 connor4312 added testing Built-in testing support feature-request Request for new features or functionality labels Mar 24, 2021
@connor4312 connor4312 added this to the April 2021 milestone Apr 1, 2021
@connor4312 connor4312 added the verification-needed Verification of issue is requested label Apr 27, 2021
@roblourens
Copy link
Member

How do I see this terminal?

@roblourens roblourens added the verification-steps-needed Steps to verify are needed for verification label Apr 28, 2021
@connor4312
Copy link
Member

This button, or with the Tests: Show Output command

  • The terminal should display the most recent test output
  • If an output terminal is already open, it is shown and its contents updated
  • If you start a new run while the terminal is open, output should be streamed live to it

@roblourens roblourens added the verified Verification succeeded label Apr 29, 2021
@github-actions github-actions bot locked and limited conversation to collaborators May 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders testing Built-in testing support verification-needed Verification of issue is requested verification-steps-needed Steps to verify are needed for verification verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants
@roblourens @Tyriar @connor4312 and others