Skip to content

Add support for skipped tests - #292

Open
Jean-Philippe Boivin (jpboivin) wants to merge 2 commits into
microsoft:dev17from
jpboivin:dev/skipped_tests
Open

Jean-Philippe Boivin (jpboivin) wants to merge 2 commits into
microsoft:dev17from
jpboivin:dev/skipped_tests

Conversation

@jpboivin

Copy link
Copy Markdown

I've cherry-picked the commit from the GTA project (csoltenborn#262) -- without other unrelated changes, and made minor changes to make it work in this fork.

I couldn't get a fully working setup (or did not understand how to properly run all tests), so I'd suggest to maintainers to take a look :) Otherwise, my team started used it (as a replacement of the official extension) and so far, no issues.

I'll report back if anything is raised.

@jpboivin

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@ghost

Copy link
Copy Markdown

This change was originally made in 2019
It would be really nice to have in the standard VS included version

@pdasen

Philipp Dasen (pdasen) commented Dec 11, 2025 •

Copy link
Copy Markdown

It looks like this plugin is still being maintained for VS2026. Correctly displaying the status for skipped tests would greatly enhance the UX for the C++ test suites in our organization. In order to not get false negatives on tests, that are run conditionally, we are forced to use our own workarounds in main(). However, the end result of having tests grayed out with "not executed" is not all that satisfactory from a developer's POV either.

Here's also a link back to the VS developer community issue:

https://developercommunity.visualstudio.com/t/googletest-skipped-tests-are-reported-as-failed-in/884416

@volkerbecker

Copy link
Copy Markdown

It's now mid-2026, and that bug is still in the latest version of Visual Studio!

@kalapatapusreevathsa2345

Copy link
Copy Markdown

I’m currently facing the same issue with GTEST_SKIP() in Visual Studio.

I reproduced it with a standalone GoogleTest containing only GTEST_SKIP(), with no application-specific dependencies. When the test executable is run directly, GoogleTest correctly reports the test as SKIPPED and exits normally. However, when the same test is executed through VSTest/Test Explorer using the Microsoft GoogleTest Adapter, it is reported as FAILED with “This test has probably CRASHED”, even though the captured GoogleTest output clearly shows [ SKIPPED ].

This PR appears to address exactly this skipped-test handling issue. It would be helpful to know if there is any plan to merge this PR into the Microsoft-maintained adapter.

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.

6 participants