Community
Participate
Working Groups
When running a large test suite, being able to find a specific test by name is a challenge because the results are not sorted. If a viewercomparator was added to testviewer then the results could be shown in a sorted order: in org.eclipse.jdt.internal.junit.ui.TestViewer: fTreeContentProvider= new TestSessionTreeContentProvider(); fTreeViewer.setContentProvider(fTreeContentProvider); fTreeLabelProvider= new TestSessionLabelProvider(fTestRunnerPart, TestRunnerViewPart.LAYOUT_HIERARCHICAL); fTreeViewer.setLabelProvider(new ColoringLabelProvider(fTreeLabelProvider)); +fTreeViewer.setComparator(new ViewerComparator()); This might need to be an option to allow users to turn it on/off. If the desire to make results sorted all the time is needed then it would probably make sense to modify the org.eclipse.jdt.internal.junit.model.TestSuiteElement to store the elements as a TreeSet sorted by the test name instead: -private List/*<TestElement>*/ fChildren; +private SortedSet<TestElement> fChildren; -fChildren= new ArrayList(childrenCount); +fChildren= new TreeSet<TestElement>(); (The TestElement would need to implement Comaparable to make that happen, as well as other iteration paths in that class).
I can't speak for JDT UI committers, but I would like such a feature, maybe you can provide a Gerrit review for that? This usually helps to get get it integrated (or rejected based on technical concerns).
IMHO results should always to sorted, option would not be necessary IMHO.
*** This bug has been marked as a duplicate of bug 219466 ***