maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Stein (JIRA)" <>
Subject [jira] [Commented] (SUREFIRE-1546) JUnit 5 runner does not honor JUnit 5 display names
Date Fri, 01 Feb 2019 16:26:00 GMT


Christian Stein commented on SUREFIRE-1546:

Display names are not intended and are not even able to be used reliably as suggested by [~dantran]
– see this [TestIdentifier.html#getDisplayName()|] documentation:
{quote}A _display name_ is a human-readable name for a test or container that is typically
used for test reporting in IDEs and build tools. Display names may contain spaces, special
characters, and emoji, and the format may be customized by [{{TestEngines}}|] or
potentially by end users as well. Consequently, display names should never be parsed; rather,
they should be used for display purposes only.
Using display name in place like

{{<testcase name="test case using displayName" classname="class name using displayName"

will lead to problems. Users may provide a single shard display name for all containers and
tests... or down-stream tools might rely on having "real" Java class names and method names
{quote}We plan to print display name in std-out and std-err.
This is the option chosen by the JUnit Team. It attaches the arbitrary display name to the
report entry of the originating source. So, down-stream tools can extract from here. Find
the sources of our soon released XML writer at GitHub, and the lines related to new attributes
(like unique-id and displayName) here:

I strongly suggest to *not* alter the XML format used by Ant/Surefire in an incompatible manner.

> JUnit 5 runner does not honor JUnit 5 display names
> ---------------------------------------------------
>                 Key: SUREFIRE-1546
>                 URL:
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: JUnit 5.x support
>    Affects Versions: 2.22.0
>            Reporter: Romain Manni-Bucau
>            Assignee: Tibor Digana
>            Priority: Major
>              Labels: junit5
>             Fix For: 3.0.0-M4
>          Time Spent: 20m
>  Remaining Estimate: 0h
> JUnit 5 runner should respect the test @DisplayName instead of displaying the classname
if any is defined. Seems last release doesn't support that feature of JUnit 5 making the console
output and reports not the expected ones.
> Origin:

This message was sent by Atlassian JIRA

View raw message