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

[SUREFIRE-2152] Include name of JUnit5 templated-tests in test description #615

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Commits on Feb 21, 2023

  1. [SUREFIRE-2152] Handle JUnit5 templated-tests separately to set name/…

    …displayName
    
    Ensures that all JUnit5 templated tests have a unique name that includes
    their invocation ID (index)
    
    This change also covers an issue of SUREFIRE-2087 where certain tests
    (namely, tests defined through a @testtemplate) still cause mixups
    of test invocations in relation with rerunFailingTestsCount, which
    can be mixed up by surefire if their name isn't unique for each distinct
    invocation.
    
    For an example description of this issue, see also:
    https://issues.apache.org/jira/browse/SUREFIRE-2087#comment-17690951
    s-rwe committed Feb 21, 2023
    Configuration menu
    Copy the full SHA
    a87457b View commit details
    Browse the repository at this point in the history
  2. [SUREFIRE-2152] Leave out suffix of templated tests, for StackTraceWr…

    …iter
    
    It seems cleaner to strip the suffix of templated tests again here,
    since it is unrelated to the actual method signature, and might hence
    just cause confusion in context of a StackTraceWriter.
    s-rwe committed Feb 21, 2023
    Configuration menu
    Copy the full SHA
    46ec3ba View commit details
    Browse the repository at this point in the history
  3. [SUREFIRE-2152] Include display-name of JUnit5 templated-tests in met…

    …hodDesc
    
    This includes the displayName (e.g. value of name="..." of a
    @ParameterizedTest) in the method description / test identifier.
    
    Provides more information than merely the invocation ID in case
    of failing tests, also for the console reporter. This can
    (especially if the actual list of arguments are quite large and/or
    dynamically determined at runtime) help a lot to identify which
    actual cases are the problematic ones.
    s-rwe committed Feb 21, 2023
    Configuration menu
    Copy the full SHA
    ff69448 View commit details
    Browse the repository at this point in the history
  4. [SUREFIRE-2152] Adapt some tests, to make expectations match the code…

    … changes
    
    Since the name of templated tests now includes the displayName as suffix,
    the nameText is the same (and hence set to null) in some test-cases
    s-rwe committed Feb 21, 2023
    Configuration menu
    Copy the full SHA
    606b334 View commit details
    Browse the repository at this point in the history