Significant amounts of JSR 292 RI code are regression tests written (using NetBeans) in the JUnit format, with annotations marking unit tests. Since JUnit is widely used, the JDK unit tests should accept JUnit tests developed, especially because NetBeans generates these tests semi-automatically during development.
The format will be simple: The "@run main..." syntax will be varied to allow "@run junit..." with substantially the same options.
In order to make this work, each jtreg deployment will need to be augmented with a file "junit.jar" installed next to "jtreg.jar" and "javatest.jar". It will be specified as JUnit 4.5 or better.
Also, JUnit tests are routinely in the same package as the tested API (or in some other named package). For this reason, the lookup rules for Java source files in jtreg need to seek the Java source file in the test directory, even if that file contains a "package" statement which places the class in a sub-directory.
The format will be simple: The "@run main..." syntax will be varied to allow "@run junit..." with substantially the same options.
In order to make this work, each jtreg deployment will need to be augmented with a file "junit.jar" installed next to "jtreg.jar" and "javatest.jar". It will be specified as JUnit 4.5 or better.
Also, JUnit tests are routinely in the same package as the tested API (or in some other named package). For this reason, the lookup rules for Java source files in jtreg need to seek the Java source file in the test directory, even if that file contains a "package" statement which places the class in a sub-directory.
- relates to
-
JDK-6891770 JSR 292 API needs initial unit tests
-
- Resolved
-