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

[SUGGESTION] Test Explorer run only failed Test #626

Closed
SchneiderMK opened this issue Oct 17, 2023 · 5 comments
Closed

[SUGGESTION] Test Explorer run only failed Test #626

SchneiderMK opened this issue Oct 17, 2023 · 5 comments
Labels
area-test Test discovery, execution, debugging enhancement New feature or request

Comments

@SchneiderMK
Copy link

Describe the feature you'd like

I'd like to be able to run all failed test from a previous test run.

Alternatives considered

Same feature could be archived if it is possible to run all test for an active filter e.g. filter "Show only Failed Tests" -> Run Test with Filter -> only failed test are executed.

Environment Information

No response

@SchneiderMK SchneiderMK added the enhancement New feature or request label Oct 17, 2023
@microsoft-issue-labeler microsoft-issue-labeler bot added the area-test Test discovery, execution, debugging label Oct 17, 2023
@SchneiderMK SchneiderMK changed the title [SUGGESTION] Test Explorer run all failed Test [SUGGESTION] Test Explorer run only failed Test Oct 17, 2023
@webreidi
Copy link

webreidi commented Oct 17, 2023

@SchneiderMK if you apply a filter and then click Run all tests, it will only run the tests displayed in the list. In the picture below I have filtered to failed tests and then clicked run all and it only ran my failed test. Is this what you are looking for or is there something else to it that is missing?

image

@SchneiderMK
Copy link
Author

Yes, thats exactly what I'm looking for. Thank you. I've tried it with an older version an it did run all my test with an active filter. Now it does exactly what I'm wanted 👍

@cawoodm
Copy link

cawoodm commented Dec 12, 2024

Every Test Framework I know has a "Run Failed Tests" option.

To me filtering and clicking "Run All Tests" is a workaround - The button "Run All Tests" should run all tests, not "Run All Visible/Filtered Tests".

The workaround is not intuitive since it's also not obvious to users that a @failed filter exists and how to use it. Unless everyone is supposed to read this workaround by googling this problem, a new button would make sense.

UPDATE: Run All Tests actually does run all tests so this is not actually a workaround:
3 tests are filtered, 112 tests are run:
Image

@webreidi
Copy link

Opened issue on VS Code, as the core functionality of the Test Explorer is implemented in VS Code. C# Dev Kit only enables C# to work within VS Code.

@webreidi
Copy link

@cawoodm just found out that, although there isn't a button, you can use "Test: Run failed tests" command from the command palette and it runs the failed tests only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-test Test discovery, execution, debugging enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants