You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would need a backing storage that can persist in between test runs.
This is obviously doable by creating an interface that the user consumes. But the way extensions are set up is that they're auto registered aren't they?
Have you got mechanisms for registering extensions that might require input, without rewriting your own entry method?
What is the challenge you see here? Reading what you wrote, it sounds to me as an extension that registers additional parameter, and consumes the tests to run via that.
(I don't think extensions can currently control execution on that level, but let's put that aside.)
Not quite sure I understand your reply. Your retry extension can tell which tests have failed. If we could attach a persistent storage (provided by the user via an interface) we could compare this run to previous runs, and then flag flaky tests via warnings or information logs
When a test run finishes, it's stores it's passed/failed/skipped somewhere via that interface. And when ran again, it does the same and also compares against the previous X records
Yeah and that is the part I am failing to understand how you meant that and where is the challenge there. Do you have some code example of what the problem would be?
Well for instance you currently can install the TRX extension and invoke it via the cli.. you couldn't do that for a flaky test extension if you needed to supply it and interface
I am also not quite sure to understand what's your question/intent. Would you like us to provide a service for story state/info about test results across runs? Are you asking how you could build you own extension that would save data?
Yeah building an extension that can compare data across runs.
Like Jakub Jareš (@nohwnd) said, you could store it next to the executable, but for thinks like GitHub pipelines, you'd need to commit this data after every run which may not be ideal.
So I thought the user could specify how to store and retrieve the test results via an interface so they can use any storage mechanism (e.g. cosmosdb, blob storage)
But since extensions are usually auto registered, and users don't define their own entry points, I don't know how you'd achieve that.
building an extension that can compare data across runs.
This is part of the suggestions I have made but so far no priority was given on it.
users don't define their own entry points
This is a mistake to me. We had to do that to ease transition from VSTest but my ideal design is that the main is explicit in the user project, like it's the case for ASP.NET, Console... We should stop trying to be to magic and hide things to users, that's the main reason why we end up building complex infrastructure for things that should be easy for users.
I don't know how you'd achieve that
As stated above, I'd go with explicit main but if you want to keep the hidden/generated mechanism then I'd expose the various supports you want to provide and users have to define the source and args by command line or through the json.
Activity
nohwnd commentedon Feb 6, 2025
What is the challenge you see here? Reading what you wrote, it sounds to me as an extension that registers additional parameter, and consumes the tests to run via that.
(I don't think extensions can currently control execution on that level, but let's put that aside.)
thomhurst commentedon Feb 6, 2025
Not quite sure I understand your reply. Your retry extension can tell which tests have failed. If we could attach a persistent storage (provided by the user via an interface) we could compare this run to previous runs, and then flag flaky tests via warnings or information logs
thomhurst commentedon Feb 6, 2025
When a test run finishes, it's stores it's passed/failed/skipped somewhere via that interface. And when ran again, it does the same and also compares against the previous X records
nohwnd commentedon Feb 6, 2025
There was some context missing for me :)
I can see this working in multiple ways, like storing the state next to the executable, so the extension can pick it up in subsequent runs.
thomhurst commentedon Feb 6, 2025
I think it'd be very useful for a lot of people. Just the question around auto registration since it's need user input (the interface)
nohwnd commentedon Feb 6, 2025
Yeah and that is the part I am failing to understand how you meant that and where is the challenge there. Do you have some code example of what the problem would be?
thomhurst commentedon Feb 6, 2025
Well for instance you currently can install the TRX extension and invoke it via the cli.. you couldn't do that for a flaky test extension if you needed to supply it and interface
Evangelink commentedon Feb 10, 2025
I am also not quite sure to understand what's your question/intent. Would you like us to provide a service for story state/info about test results across runs? Are you asking how you could build you own extension that would save data?
thomhurst commentedon Feb 10, 2025
Yeah building an extension that can compare data across runs.
Like Jakub Jareš (@nohwnd) said, you could store it next to the executable, but for thinks like GitHub pipelines, you'd need to commit this data after every run which may not be ideal.
So I thought the user could specify how to store and retrieve the test results via an interface so they can use any storage mechanism (e.g. cosmosdb, blob storage)
But since extensions are usually auto registered, and users don't define their own entry points, I don't know how you'd achieve that.
Does that make more sense?
Evangelink commentedon Feb 10, 2025
It does! Thanks
This is part of the suggestions I have made but so far no priority was given on it.
This is a mistake to me. We had to do that to ease transition from VSTest but my ideal design is that the main is explicit in the user project, like it's the case for ASP.NET, Console... We should stop trying to be to magic and hide things to users, that's the main reason why we end up building complex infrastructure for things that should be easy for users.
As stated above, I'd go with explicit main but if you want to keep the hidden/generated mechanism then I'd expose the various supports you want to provide and users have to define the source and args by command line or through the json.
Youssef1313 commentedon Oct 11, 2025
Related to #5951
Youssef1313 commentedon Nov 7, 2025
NOTE: https://github.com/jaredpar/runfo is already used by dotnet/roslyn for (at least) tracking of flaky tests. Example issue: dotnet/roslyn#58199
I think we can try to provide something with AzDO APIs (this would be a child of #5951).
Youssef1313 commentedon Jun 2, 2026
#8761 has a conrete proposal on how I think flaky tests should be handled.
Evangelink commentedon Aug 26, 2026
Tom Longhurst (@thomhurst) there are some bits that have been implemented as part of the ADO extension. Please try it out.
thomhurst commentedon Aug 26, 2026
Nice Amaury Levé (@Evangelink) - I don't use ADO though - just GitHub!