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 RunTestsInContext #1

Closed
wants to merge 3 commits into from
Closed

Conversation

333fred
Copy link
Owner

@333fred 333fred commented May 6, 2020

This command tries to replicate the ctrl+R, T experience in full VS. I'm planning on sending a followup PR later in the week to add DebugInContext, and then a PR to the vscode extension to enable the extension. While Omnisharp does have an existing TestCommandService that does some of this, it doesn't quite replicate the experience: it will only run the test method that it's invoked in, not potentially the entire test class or whatever other context it's in. Additionally, it's not unified with the test running framework the test of the V2 test commands use, so I opted to introduce an entirely new command, RunTestsInContext, which will walk up the syntax tree for a given location to find the nearest test method or class, if one exists, and either run the method itself, or run the entire class.

Commit 1 moves Omnisharp forward to the 3.1 LTS SDK, from 3.0.
Commit 2 does some refactoring of the existing test commands to remove .Result usage and plumb async all the way through.
Commit 3 Implements RunTestsInContext.

This command tries to replicate the ctrl+R, T experience in full VS. I'm planning on sending a followup PR later in the week to add DebugInContext, and then a PR to the vscode extension to enable the extension. While Omnisharp does have an existing TestCommandService that does some of this, it doesn't quite replicate the experience: it will only run the test method that it's invoked in, not potentially the entire test class or whatever other context it's in. Additionally, it's not unified with the test running framework the test of the V2 test commands use, so I opted to introduce an entirely new command, RunTestsInContext, which will walk up the syntax tree for a given location to find the nearest test method or class, if one exists, and either run the method itself, or run the entire class.
@333fred 333fred force-pushed the tests-in-containing-symbol branch from a4ff4ec to 3cd7cd7 Compare May 6, 2020 16:24
@333fred 333fred closed this May 7, 2020
333fred pushed a commit that referenced this pull request Sep 20, 2020
Use text edit for main insert text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant