harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geir Magnusson Jr <g...@pobox.com>
Subject Re: Do we mix up regression and unit tests?
Date Mon, 24 Apr 2006 21:02:00 GMT


Mark Hindess wrote:
> On 4/23/06, Dmitry M. Kononov <dmitry.m.kononov@gmail.com> wrote:
>> On 4/22/06, LvJimmy´╝îJing <firepure@gmail.com> wrote:
>>> In my understanding, if someone want to add some regression tests to test APIs,
it
>>> can be added directly to the API test files if any, it is not necessary to
>>> open a new file.
>> I see. Could you please explain what is your understanding of tests
>> that are located in the luni/src/test/java/org/apache/harmony/tests/*
>> directories? I would like to know what is the reason of creating
>> subdirectories of the <module>/src/test/java directory others than the
>> tests directory?
> 
> You are right to be confused.  It is confusing.  But it's just
> historical.
> 
> I think it is an attempt to match the package naming convention for
> tests as described at:
> 
>   http://incubator.apache.org/harmony/subcomponents/classlibrary/pkgnaming.html
> 
> It says that tests should be in packages named:
> 
>   org.apache.harmony.<modulename>.tests
> 

Which I'll note is a suggestion.  I've been waiting for this subject to
come back.

Until we get our act together and find some way to test spec classes in
a way that simulates how user code uses spec classes (like w/ a test
harness) I guess we need to have API tests in here - IOW, tests that are
testing the public APIs of the portion of the Java classlib implemented
in 'modulename'.

However, I think that should be the limit of this usage, and we should
put as many internal implementation tests in the same package as the
code being tested for all the advantages we hashed out before.

(This gives me a great idea for a really original and important SOC
project - the test harness that allows us to test the classlib in
isolation, not in situ in the VM.)


> The 'tests' packages are a result of integration of contributions that
> for whatever reason did not use the naming convention.
> 
> Having said that I think that *none* of the tests current have the
> correct package names according the that naming convention.  Those
> closest are missing the '<modulename>' before 'tests'.
> 
> Should we rename our tests to match the convention?  (Thus breaking
> lots of JIRA patches ;-( ).

For API tests?  yes - when applying patches, we should be able to nip
and tuck the package issues...

geir


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message