Show/hide test duration in test nodes #1143
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR close issue #1137 by displaying the test duration in the tree nodes.
The test duration is shown in square brackets behind the tree node name.
The user can turn on/off this feature using the tree context menu:
The current state (turned on/off) is saved in the settings, so that the last active state is restored when restarting TestCentric. The state is not stored in the VisualState file.
From technical point of view the TreeNodes are created by the
DisplayStrategy
class, therefore I placed the code there (the core of the implementation is done here). It handles these use cases:If no test results are available or the feature is turned off, the tree node names remain as before.