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

how does InvalidOperationException result in "Skipping test adapter" #4289

Open
SimonCropp opened this issue Dec 9, 2024 · 1 comment
Open
Labels
Area: Testing Platform Belongs to the Microsoft.Testing.Platform core library

Comments

@SimonCropp
Copy link
Contributor

in VSTestDiscoverTestExecutionRequestFactory.CreateRequestAsync
https://github.com/microsoft/testfx/blob/main/src/Platform/Microsoft.Testing.Extensions.VSTestBridge/Requests/VSTestDiscoverTestExecutionRequestFactory.cs#L55

there is this code

throw new InvalidOperationException($"Skipping test adapter {_testFrameworkAdapter.DisplayName} because it is not {nameof(IVSTestFlattenedTestNodesReportCapability)} capable.")

and i cant seem to understand how a InvalidOperationException is skipped?

Removing that throw passes all the test #4288

@Youssef1313 Youssef1313 added the Area: Testing Platform Belongs to the Microsoft.Testing.Platform core library label Dec 9, 2024
@Evangelink
Copy link
Member

There are some issues there, thanks @SimonCropp!

  1. Message is incorrect, it's not skipping the test framework, it's causing the test app to fail. This is a safeguard because the new platform supports tree based test structure but sadly we are limited by Test Explorer and so when using the VSTest bridge we do want the framework to provide a flattened list of tests (what VSTest and Test Explorer expect).

  2. Message of exceptions should be localized

  3. We don't have a test for this scenario

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Testing Platform Belongs to the Microsoft.Testing.Platform core library
Projects
None yet
Development

No branches or pull requests

3 participants