[Fwd: How to test an Enhancement and Where]
Michael McMahon
Michael.McMahon at Sun.COM
Wed May 16 13:40:33 PDT 2007
Andreas,
This question was forwarded to us from the jtreg alias.
> Hi Geeks
>
> I am new using jtreg to test changes in the JDK and so I would like to
> ask two questions.
>
> 1) Name of the Test:
>
> I do an enhancements based on bug 4175918 and 6313849 (both are the
> same) which asks for a URLConnection.disconnect() method. The
> URLConnection will only contain an abstract disconnect class but all the
> sub classes need to implement it. So I am wondering if the test should
> be named after the bug number or if it should be named after the method
> 'disconnect' because it is an enhancement.
>
There are no concrete rules, but in my opinion, for bug fixes, where the
test
is not likely to be more widely useful beyond the scope of the bug, then
the test should be named after the bug id. If the test is a unit test
for an RFE
or other feature, then you could name it based on the functionality
being tested.
The idea would be that further tests could in the future be added to the
same
test case file.
> 2) Place of the Test:
>
> Originally I though the test should go into java/net/URLConnection but
> then I thought that the real tests must be done where it is implemented
> meaning inside sun/net/www/protocol/AAA/AAAURLConnection. What is the
> best place?
>
Again, we don't have concrete rules here. java/net/URLConnection might make
sense because it is a common directory (assuming there is one test for
all of the implementation
classes)
- Michael.
More information about the net-dev
mailing list