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

make order of test execution obvious when viewing results #523

Open
cbolson1 opened this issue Apr 26, 2023 · 1 comment
Open

make order of test execution obvious when viewing results #523

cbolson1 opened this issue Apr 26, 2023 · 1 comment

Comments

@cbolson1
Copy link

What feature do you want to see added?

When viewing the set of test results for a run, tests are displayed by sorting them alphabetically. Instead, I'd greatly prefer to keep this list ordered based upon the order in which the tests were executed. This should be the order in which the tests appear in the .xml test result file. That way, when viewing a failure in a particular test, it is trivial to identify the test that ran right before it.

If we still want to sort test results alphabetically, another way to make the ordering clear in the results is by displaying a link to the previous test when looking at the result for a test.

Upstream changes

No response

@jonaslind
Copy link
Contributor

jonaslind commented Dec 19, 2023

I implemented changes in #494 that allow third party plugins to enhance the test results. In the discussion of #494 if you scroll down a bit you'll see a mock up screenshot of how the tests can be sorted chronologically if the results are enhanced with a custom Timestamp plugin. This allows different sorting strategies to be used in different situations.

I wouldn't recommend that your enhancement is implemented as default behavior. You can't assume that the .xml test result file always lists tests in execution order. For example, Maven's Surefire Plugin supports parallel execution of tests. Execution order is less relevant and less intuitive when that is used.

However, in many cases like yours it is probably perfectly reasonable and desirable to assume that the the tests are listed in execution order. So I would suggest a new plugin; it's pretty simple to write a plugin that enhances the test result tables with an Execution Order column that the table can be sorted by. For each job you would choose that plugin as an "Additional test report feature" in the JUnit Plugin configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants