harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Ellison <t.p.elli...@gmail.com>
Subject Re: newbie to project-where to start from
Date Wed, 15 Feb 2006 21:47:42 GMT
karan malhi wrote:
> I need to know how I can start on harmony. I would like to start by
> writing some tests.

That would be great -- thanks Karan!

If you have detailed knowledge of another implementation of Java then we
need to talk further, otherwise dive right in.  Examples of 'detailed
knowledge' can be found in the Harmony Questionnaire [0]

[0] http://incubator.apache.org/harmony/auth_cont_quest.html

> Here are my questions :
> 1. Are there any predefined assertions to test or do we simply write
> test after looking at the api docs for each method

Looking at the spec and writing tests is a pretty good start.  There are
some tests in the repository already, and some more incoming, but we'll
worry about merging new code into the full test suite.

> 2. Are there any naming conventions for test cases

Yes.

Pick a module [1] that interests you and from there the test code is in
<module_name>/src/test/java/org.apache.harmony.tests.<pkg>.<type>Test.java
where <pkg> and <type> are the package and type under test; see here [2]
for an example.

We are using JUnit, so your test class extends junit.framework.TestCase.
 Each test method is "public void test_<methodID>()" where <methodID> is
the method under test including param types; e.g. [3].

Don't worry too much about the names, we'll fix them on the way in if
necessary.

[1]
http://svn.apache.org/viewcvs.cgi/incubator/harmony/enhanced/classlib/trunk/modules/
[2]
http://svn.apache.org/viewcvs.cgi/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/java/net/
[3]
http://svn.apache.org/viewcvs.cgi/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/org/apache/harmony/tests/java/net/InetAddressTest.java?view=markup

> 3. When one files a JIRA for a failed test, does one also attach the
> test to the JIRA

Yes please, a succinct description with a unit test is great, and if you
have a proposed patch that would be even better ;-)

We have had lots of good examples of bug reports, here's one I picked at
random to show the type of thing we like to see:
	https://issues.apache.org/jira/browse/HARMONY-53

Thanks again for your offer of help.

Regards,
Tim

-- 

Tim Ellison (t.p.ellison@gmail.com)
IBM Java technology centre, UK.

Mime
View raw message