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

@ParameterizedTest display custom names for arguments #2452

Closed
SarathBabu opened this issue Oct 18, 2020 · 1 comment
Closed

@ParameterizedTest display custom names for arguments #2452

SarathBabu opened this issue Oct 18, 2020 · 1 comment

Comments

@SarathBabu
Copy link

When using @ParamerizedTest annotation, will it be possible to display a string other than what is supplied by toString()?
When we are using some big objects the toString value is very large and displays lots of informations which are not relevant

It would be helpful if we can give provision to

  • display some parameter on the argument like {0.shortName} or {0.route.origin} etc
  • Provide another class name which will generate the string to display for each argument

Deliverables

Provision to customise the name of the arguments in @ParamerizedTest

@sbrannen
Copy link
Member

Closing this issue since it is effectively a duplicate of #1154.

I'll link to this issue from #1154, since this issue targets parameterized tests explicitly; however, a general purpose solution should be implemented in conjunction with #1154 that is usable with display names for parameterized tests as well.

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