-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Testing API: "Retired" TestItem "state" #134970
Comments
Also there is a feature related to this which might worth to be considered. Test Explorer had an "auto-run" option. I can manually add option like this but it is a nice feature I believe. |
The Test Explorer UI extension used retired states to drive autorun. I would instead like to have the extension drive its auto autorun (#134941), so retired states are no longer necessary for this use case and I'm not sure whether I want to bring them back. |
The retired state basically an indicator in the tree view and the user can see if a test's result is outdated. The auto-run is built upon this indeed. I can implement it easily if you don't wish to add it. |
You can contribute to all test menus like any other menu 🙂 https://code.visualstudio.com/api/references/contribution-points#contributes.menus |
Hello, |
2 similar comments
Hello, |
Hello, |
Hi @connor4312, is there a way to mark some tests as outdated without auto rerun? In our extension, we would like to mark some tests as outdated in cases like some configs change, but we prefer not to do auto rerun since rebuilding the project may take a long time. |
I've implemented proposed API for this: declare module 'vscode' {
export interface TestController {
/**
* Marks an item's results as being outdated. This is commonly called when
* code or configuration changes and previous results should no longer
* be considered relevant. The same logic used to mark results as outdated
* may be used to drive {@link TestRunRequest.continuous continuous test runs}.
*
* If an item is passed to this method, test results for the item and all of
* its children will be marked as outdated. If no item is passed, then all
* test owned by the TestController will be marked as outdated.
*
* Any test runs started before the moment this method is called, including
* runs which may still be ongoing, will be marked as outdated and deprioritized
* in the editor's UI.
*
* @param item Item to mark as outdated. If undefined, all the controller's items are marked outdated.
*/
invalidateTestResults(item?: TestItem): void;
}
} I've gone back and forth on the method name a few times 🤷 Please let me know if there are any concerns with this. You can try it out in the next Insiders. |
Hello,
|
* testing: add proposed testInvalidateResults API For #134970 * fix tests
Sure, I will have it take both an array as well as a single value.
Correct, if you have ideas to clarify wording let me know:
|
Finalized in #188180 |
@connor4312 what is the best way to verify this? |
|
Verified, though it was easier for me to see the change with a dark theme than a light theme. |
There was a feature request: #115086
In case of the final API I don't know how to implement it. I cannot find the feature.
I guess it is removed. I think my users would love the feature.
Would you help me on this @connor4312 ?
The text was updated successfully, but these errors were encountered: