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

Fix TreeView flickering #1167

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Fix TreeView flickering #1167

wants to merge 1 commit into from

Conversation

rowo360
Copy link
Contributor

@rowo360 rowo360 commented Dec 19, 2024

This PR closes #1165 which reports a flicking in the Treeview when executing tests.

As mentioned in the issue description this bug is caused by the 'Show duration' implementation. This implementation updates a tree node name by adding the test duration as a suffix right away whenever a test finished.

I propose to solve this issue by doing one step back: instead of updating the tree node names on TestFinished event, we'll update them on the TestRunFinished event. That means that the TreeView update is triggered only once - which will solve the flickering.

Obviously this is one step back for the user as he cannot observe the test duration anymore during a test run, but needs to wait until the test run finish. Especially for long running test runs (for which test duration is most helpful), that's not the best solution.
However I didn't find any simple solution, which takes care about all use cases. And unfortunately WindowsForms TreeView triggers a TreeView refresh whenever a TreeNode name is changed.
So overall I want to fix this flickering effect first, which is annoying and hits all users regardless if 'Show duration' is activated or not.

Additional note:
If test run was executed previously and afterwards show test duration is activated, the test duration will be shown immediately - this is kept unchanged.

Some further ideas:

  • Introduce a Timer based approach to update the Tree node names. So, the Tree node names are updated during a test run only every 10s (for example)
  • Attention this idea is a major design switch - nonetheless I'm mentioning it.
    We can introduce additional columns next to the tree view. One of these columns will show the 'Test duration'. So instead of updating the tree node names, we need to update the column cells. I hope that updating cells won't cause a flickering effect as well. But overall, it must be evaluated first, if such columns are beneficial at all and for which other information they can be used (for example categories)?
    And it's worth to mention that WindowsForms doesn't support a 'TreeView with additional columns' out-of-the-box. But there are several examples in the web which might be helpful.

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.

Execute tests - TreeView is flickering
1 participant