title: Generating display names for @ParameterizedTest in JUnit 5
body: <p>I have a bunch of <code>@ParameterizedTest</code>s that receive parameters from a <code>@MethodSource</code> with quite verbose <code>toString()</code> results (e.g. Selenium's <code>WebDriver</code>). These are used per default to compose the corresponding display names. From the <a href="https://junit.org/junit5/docs/current/user-guide/#writing-tests-parameterized-tests-display-names" rel="noreferrer">JUnit 5 user guide</a>:</p>
  
  <blockquote>
    <p>By default, the display name of a parameterized test invocation contains the invocation index and the String representation of all arguments for that specific invocation. However, you can customize invocation display names via the <code>name</code> attribute of the <code>@ParameterizedTest</code> annotation […]</p>
  </blockquote>
  
  <p>While this allows customizing the display names to a certain degree, it seems like I cannot adapt the string representation of the individual parameters. Unfortunately, specifying a generator via <a href="https://junit.org/junit5/docs/current/user-guide/#writing-tests-display-name-generator" rel="noreferrer"><code>@DisplayNameGeneration</code></a> can only be applied at the class level and doesn't affect the display name of the parameterized test invocations.</p>
  
  <p>Is there a way to use a <a href="https://junit.org/junit5/docs/current/api/org/junit/jupiter/api/DisplayNameGenerator.Standard.html" rel="noreferrer"><code>DisplayNameGenerator</code></a> for <code>@ParameterizedTest</code> or to customize the string representation of the given parameters?</p>