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
Describe the bug
I notice some annoying flickering of the test tree when executing a large amount of tests.
In my case the assembly contains 5000 unit tests which are running pretty fast.
First analysis shows up that this flickering issue is a side effect of the implementation for issue #1137 - which wants to show the test duration in test tree nodes.
To Reproduce
Steps to reproduce the behavior:
Open test assembly which contains several fast running tests (for example the attached one)
Analysis:
The idea for issue #1137 (Show test duration in tree nodes) was to display the test duration as soon as a test is finished - that is identically to the Tree Node image (Passed, Failed...). However in this case we are setting the TreeNode name.
In the sample project there are 5000 tests and thus 5000 TestFinished events, which means that 5000x a TreeNode name is updated. I observed and learned now, that setting a tree node name, will invoke a refresh of the entire tree.
That means that the tree is gettings refreshed over and over again, resulting in that flickering.
Proposed solution:
I suggest that we take a step back: flickering is annoying and must be avoided in the first place.
Therefore I suggest that we update the tree node names for the 'Show test duration' feature once at end of the test run instead. Of course that's not that beneficial as before, but for now it's an easy solution. Moreover we can add some BeginUpdate()/EndUpdate() statements in this case.
Another idea was to update the test duration in tree nodes not as soon as a test method finished, but only as soon as a test fixture finshed (updating all tree nodes of that fixture). I believe that would work for my sample project, but I also believe that the flickering effect will return if using a slightly different project (for example: many fixtures with few test methods)
So, I dropped this idea.
Describe the bug
I notice some annoying flickering of the test tree when executing a large amount of tests.
In my case the assembly contains 5000 unit tests which are running pretty fast.
First analysis shows up that this flickering issue is a side effect of the implementation for issue #1137 - which wants to show the test duration in test tree nodes.
To Reproduce
Steps to reproduce the behavior:
=> Observe test tree flicking
Sample test project.zip
Expected behavior
I expect that there's no flickering.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: