Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-17478

Add extension point to rewrite test names

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved (View Workflow)
    • Minor
    • Resolution: Fixed
    • junit-plugin
    • None

    Description

      It's easy to write JUnit tests in scala, however scala allows more flexibility in naming than java does. In particular, if you enclose an identifier with back ticks, you can include symbols, spaces, and other characters that are not valid names in java. The scala compiler encodes them, eg `hello world` becomes "hello$u0020world".

      It can be helpful to write test method names between back ticks so that you can give an easy to read statement of what is the test expects. The problem is that these names are displayed in Jenkins as the encoded version, which is hard to read.

      This task is to create an extension point to allow a plugin to rewrite the package/class/method names so that they are displayed in the JUnit results pages in a readable format.

      I've used scala as an example, but this would apply to any JVM language that allows invalid java identifiers in its own identifiers by encoding them.

      Attachments

        Issue Links

          Activity

            People

              dnadolny Donny Nadolny
              dnadolny Donny Nadolny
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: