-
Notifications
You must be signed in to change notification settings - Fork 285
Description
As per this comment:
Yes that is how it is right now.
Originally posted by @nohwnd in #2551 (comment)
You should create a new TestNode/PropertyBag for each new test state, and these new nodes should still contain the well known properties such as TestMethodIdentifierProperty
and TestFileLocationProperty
.
So a test could go:
Discovered > InProgress > Passed/Skipped/Failed
Because the property bag doesn't have any public methods for removing state/properties, I cannot re-use a test node that's been sent in a previous state.
So I have to reconstruct my test node again, and re-populate all the data for the well known properties, etc. And the more tests I have, the more I have to do this obviously.
Discovered(New Node w/ DiscoveredState) > InProgress(New Node w/ InProgressState) > Passed/Skipped/Failed(New Node w/ Passed/Skipped/FailedState)
This means a lot more allocations, and more work to new up all the required metadata again and again.
Would it not make sense for a new state property to simply replace the old state property? Currently that throws an exception.
Discovered(New Node w/ DiscoveredState) > InProgress(Same Node w/ added/replaced InProgressState) > Passed/Skipped/Failed(Same Node w/ added/replaced Passed/Skipped/FailedState + extras such as TimingInfo etc)
Keen on your thoughts. Feels like it'd be more performant?