Only track last status / Allow overridding test status
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 1k
- Forks
- 312
- Avg merge
- 8h 30m
- Merged PRs (30d)
- 469
Description
This is what someone has said they want from a testing suite:
> for things like acceptance tests - I may have 10 tests in a fixture, if 9 of them pass maybe I view that as a 'pass' - from a business process perspective the 1 failure is acceptable (eg I have 10 product lines, 1 of them failing means I still release, just disable that one and fix as a hotfix)
If I wanted to support this currently, I'd have to hold back from sending status updates to the message bus, and only send them when the tests are all finished - Which is a hacky workaround and also detrimental to the UX.
If I send a "Failed" update for a test node, but then after send a "Passed" update for that same test node, MTP still reports a failure at the end. It also messes up the test counts because I don't think MTP checks that the test was already reported or not, it just increments some basic counter.
This means a framework can't change its decision about a test. Which sounds weird, but there are use cases where users have specific needs.
I think MTP should maintain a dictionary of `ConcurrentDictionary` - And when receiving new statuses, just overwrite what's currently in the dictionary. This would give proper counts (just count the dictionary entries at the end) and allow statuses to be overridden.
What do you guys think?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating Microsoft.Testing.Platform's test-status aggregation and message-bus handling, then trace how repeated updates for one TestNodeUid affect the final result and counts. The work is complete when a later status replaces the earlier status and final totals count each test node once using its latest status, with coverage for an overridden result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100