tags:

views:

85

answers:

3

Can someone please explain the following

  1. How was the first JDK release unit Tested? Since Junit came after Java how did they do it?
  2. Are the current releases using Junit to test the JDK API?

Regards

+4  A: 

The JDK is tested , at least now, using jtreg . I am not aware of any usage of JUnit to test the JDK.

Robert Munteanu
+4  A: 
  1. Unit testing is a concept and a practice. It is not a package or specific implementation thereof (although it was admittedly popularised by JUnit).

  2. I don't know what's the Sun, Oracle :-), standard is for testing. I'm sure it's pretty thorough though. Bear in mind there is more than on JDK publisher.

Joel
Unit testing in Java may (or may not) have been popularized by JUnit, but it's been around in other languages for a very long time. The tens of thousands of unit tests for the Tcl core, for example, have long used the builtin Tcltest package.
RHSeeger
+2  A: 

I imagine that the very first JDKs (pre Java 1.0) were tested using a harness implemented using other technologies; e.g. C, shell scripting, and so forth.

Certainly Java unit testing was done in Java well before JUnit came along. I remember using a framework developed in-house at DSTC in the late 1990s, and the GNU Classpath project used a framework called Mauve. Java test frameworks are not rocket science.

Stephen C