Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show/hide test duration in test nodes #1143

Merged
merged 1 commit into from
Oct 20, 2024
Merged

Show/hide test duration in test nodes #1143

merged 1 commit into from
Oct 20, 2024

Conversation

rowo360
Copy link
Contributor

@rowo360 rowo360 commented Oct 18, 2024

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:

  • OnTestFinished: update tree node name of the finished test
  • OnTestRunStarting: reset all tree node names - that's identical to our behavior regarding the tree node images. So that no outdated results from a previous run are shown.
  • Turn on/off features: update all tree node names
  • Switch display strategy/grouping: If feature is turned on, the new strategy/grouping will display test durations right from the start.

If no test results are available or the feature is turned off, the tree node names remain as before.

@rowo360
Copy link
Contributor Author

rowo360 commented Oct 20, 2024

@CharliePoole :
I'm aware that we are already focused on the next issues. But may I draw your attention to this PR?
It would be great if we could finalize this before I start with the next issues and potential merge conflicts.
And some review is required as the next step - thanks a lot!

@CharliePoole
Copy link
Contributor

Right! I held off till after the release and then forgot it.

@CharliePoole CharliePoole merged commit 183bfb4 into main Oct 20, 2024
2 checks passed
@CharliePoole CharliePoole deleted the TestDuration branch October 20, 2024 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants