-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Port BasicAddMissingReference.InvokeSomeFixesInVisualBasicThenVerifyReferences to the new test framework #57626
Conversation
…eferences to the new test framework
734f5bf
to
b2e1d2f
Compare
c66ecb5
to
8bb0dcf
Compare
src/VisualStudio/IntegrationTest/New.IntegrationTests/AbstractEditorTest.cs
Outdated
Show resolved
Hide resolved
39257f7
to
7ada47d
Compare
src/VisualStudio/IntegrationTest/New.IntegrationTests/InProcess/EditorInProcess.cs
Outdated
Show resolved
Hide resolved
src/VisualStudio/IntegrationTest/New.IntegrationTests/InProcess/EditorInProcess.cs
Outdated
Show resolved
Hide resolved
src/VisualStudio/IntegrationTest/New.IntegrationTests/InProcess/SolutionExplorerInProcess.cs
Outdated
Show resolved
Hide resolved
await JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); | ||
|
||
var filePath = await GetAbsolutePathForProjectRelativeFilePathAsync(projectName, relativeFilePath, cancellationToken); | ||
VsShellUtilities.OpenDocument(ServiceProvider.GlobalProvider, filePath, VSConstants.LOGVIEWID.Code_guid, out _, out _, out _, out var view); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
iirc there is an async document open service now - https://devdiv.visualstudio.com/DevDiv/_git/VS.RPC.Contracts?path=%2Fsrc%2FMicrosoft.VisualStudio.RpcContracts%2FOpenDocument%2FIOpenDocumentService.cs&_a=contents&version=GBmain
It might more reliably set the focus and there are options to activate it, set selection, set visible ranges, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea how one would use this. @olegtk ?
Roslyn's integration tests use a custom harness, where test code executes in a separate process (testhost.x86.exe or similar) and use .NET Remoting to invoke methods on objects within a Visual Studio instance. This pull request creates a second integration test project using the new test harness from microsoft/vs-extension-testing. In addition to moving maintenance of the test harness infrastructure to a common repository, this change significantly reduces integration test reliance on .NET Remoting in hopes of improving test performance and reliability by executing test code directly within the Visual Studio instance. It also standardizes diagnostics collection (screenshots, Windows event logs, the activity log, and IDE state at point of failure).
This change ports one notoriously flaky test from Roslyn's harness to the new harness, along with its required supporting methods. The new code differs primarily in the following ways:
The goal of the new test project in the current limited form is twofold: