Skip to content

Conversation

@delatrie
Copy link
Contributor

@delatrie delatrie commented Aug 11, 2025

Context

Currently, the default test names assigned by Allure.Xunit have the following format: <namespace>.<class>.<method>(<parameters>) (the same format is used for full names if useLegacyId is set to true):

image

This leads to redundant data being included in a test's name:

  • namespace and class: already included in titlePath and package
  • parameters: visible next to test names in Allure 2; will be improved in Allure 3

The same is also true for Allure.Xunit's testMethod values (it's used instead of display names on the Packages tab). These values additionally include test arguments (the actual values used during the test execution), which are redundant for the same reason the parameters are redundant in display names.

The only motivation I can think of for having such detailed names is to create a somewhat manageable report, in case no hierarchy is properly defined. As we at least have the packages hierarchy, which contains the namespaces and the class names, the redundant data can be excluded from the names.

Similarly, Allure.NUnit uses the following format: <method>.(<arguments>), where arguments are redundant for the same reason as parameters are redundant for Allure.Xunit:

image

Additionally, having argument-dependent names doesn't play well with TestOps, as one of these argument-specific names will be picked up by the parameterized test case, which is confusing.

The PR shortens the default names to only include method names.

Checklist

@delatrie delatrie changed the title fix(nunit, xunit): preclude redundant data from default test display names fix(nunit, xunit): exclude redundant data from display names and testMethod Aug 12, 2025
@delatrie delatrie merged commit d3b940f into main Aug 13, 2025
6 checks passed
@delatrie delatrie deleted the fix/display-names branch August 13, 2025 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants