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

One of the FAQ's for jtreg fails to specify a desired junit version

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • jt4.1
    • tools
    • None

      Says faq.html (the one in the jtreg distribution, not the one online):

      "To run JUnit tests within jtreg, you must have a copy of junit.jar available. To do this, you should do one of the following:

      Put junit.jar on the classpath used to run jtreg.
      You can specify the location by setting the system property junit.jar
      Install a copy in the jtreg/lib directory if it is not already present.
      If you do not have a copy of junit.jar on your system, you can download it from http://junit.org/."

      No version number is specified. If junit 4.11 is copied into jtreg/lib/junit.jar, it fails, like so:

      "JavaTest Message: Test threw exception: java.lang.Exception: No JUnit 4 driver (install junit.jar next to jtreg.jar)
      JavaTest Message: shutting down test

      STATUS:Failed.`main' threw exception: java.lang.Exception: No JUnit 4 driver (install junit.jar next to jtreg.jar)

      TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.Exception: No JUnit 4 driver (install junit.jar next to jtreg.jar)"

      Note that it fails to complain about the version or any other problem (the actual problem is a missing hamcrest-core.jar -- this is what comes of having "a" junit.jar on your system without remembering the other bits needed) and there is ALREADY a junit.jar in the specified place. Junit 4.10 works w/o hamcrest. Older junit (3.8?) probably won't work because I don't think it supports the @Test annotation, but who knows, I have not tested it, and the faq provides no guidance.

            Unassigned Unassigned
            drchase David Chase (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: