Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7903751

Introduce a timing extension for junit tests which prints the time taken for each test method

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Duplicate
    • P4
    • None
    • None
    • tools
    • None

    Description

      As noted in this PR against JDK mainline https://github.com/openjdk/jdk/pull/19627/files#r1637622775, having the ability to print the time taken for each junit test method can be useful. junit provides a way to do that through the use of (junit specific) Extension interface https://junit.org/junit5/docs/current/api/org.junit.jupiter.api/org/junit/jupiter/api/extension/Extension.html. jtreg could implement such an interface and package it to be available through the ServiceLoader mechanism noted there.

      While this is specific to junit, we could also look into making this available for testng tests too, if it provides similar hooks.

      Attachments

        Issue Links

          Activity

            People

              jpai Jaikiran Pai
              jpai Jaikiran Pai
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: