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

When jtreg cannot find junit to run a test, it gives useless advice

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • None
    • tools
    • generic
    • generic

      If I try to run a junit-using test within jtreg without making junit available, it errors out like so:

      TEST RESULT: Error. JUnit not available: see the FAQ or online help for details

      The online FAQ, searching for junit, says (and only says):

      "1.13. Why not use JUnit?

      JUnit was not around when we started writing tests for JDK. And, the test tag specification has been specifically designed for testing JDK, with support for testing applets, command-line interfaces, and so on, as well as simple API tests.

      And by now, there are many thousands of tests written for jtreg, so it would not be practical to convert to JUnit."

      And I am no closer to solving my problem. The FAQ even makes me wonder if the tests are completely malformed and are only intended to be run within junit. (Seriously, why should I NOT think that?)

      I may be looking in the wrong FAQ, but it was the one I found at http://openjdk.java.net/jtreg/faq.html .
      If there is a better FAQ that I should have been reading, the error message should name it explicitly, instead of letting me guess. Better yet, especially if the answer I seek is as simple as "please add junit.jar to your CLASSPATH, version 3.8 or higher", why not just tell me how to solve the problem right there in the error message?

            jjg Jonathan Gibbons
            drchase David Chase (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: