Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 80878 invoked from network); 26 Jun 2006 07:20:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Jun 2006 07:20:36 -0000 Received: (qmail 49190 invoked by uid 500); 26 Jun 2006 07:20:32 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 49143 invoked by uid 500); 26 Jun 2006 07:20:32 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 49132 invoked by uid 99); 26 Jun 2006 07:20:32 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Jun 2006 00:20:32 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of zhanghuangzhu@gmail.com designates 66.249.82.200 as permitted sender) Received: from [66.249.82.200] (HELO wx-out-0102.google.com) (66.249.82.200) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Jun 2006 00:20:31 -0700 Received: by wx-out-0102.google.com with SMTP id t16so842881wxc for ; Mon, 26 Jun 2006 00:20:10 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=dfNNUPU7gQWibaPO1k7mxdxZcJ65cCZKoeWLtoCg5fei6vEOQV8Wczdz1z8Gct0lN1CsbhCNv0WTgpFBiRaRsZuDTOSAuGHi9w+XUIVBVCEvNaRBDbeJnCnuM4g3a8tgu2+OouSl34dmFeMo9chNvq17NjhRPyTD5ogDouoZYNw= Received: by 10.70.110.18 with SMTP id i18mr8110059wxc; Mon, 26 Jun 2006 00:20:10 -0700 (PDT) Received: by 10.70.118.15 with HTTP; Mon, 26 Jun 2006 00:20:10 -0700 (PDT) Message-ID: <4d0b24970606260020j177d1190g4b737f933b262bc5@mail.gmail.com> Date: Mon, 26 Jun 2006 15:20:10 +0800 From: "Andrew Zhang" To: harmony-dev@incubator.apache.org Subject: Re: [classlib] Merging frameworks for testing serialization - first step In-Reply-To: <6e47b64f0606260008q360793cta561ea8efba72104@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_46805_32411226.1151306410493" References: <6e47b64f0606200111s3e702238hcf6a7e49482bf991@mail.gmail.com> <6e47b64f0606222054l24b05625y7cdbc16f7f8d9b1b@mail.gmail.com> <4d0b24970606232015t269be753ib80a583c0a46afec@mail.gmail.com> <6e47b64f0606260008q360793cta561ea8efba72104@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_46805_32411226.1151306410493 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 6/26/06, Stepan Mishura wrote: > > On 6/24/06, Andrew Zhang wrote: > > > > Welldone stepan! > > > > I have a small question about the sample from serialization page[1]: > > > > > > public void testSerializationCompatibility() > > throws Exception { > > > > SerializationTest.verifyGolden(new SomeSerializableClass()); > > } > > > > Any argument for ****.golden.ser? Typing error? > > > Good catch! I missed 'TestCase' param in the example - fixed in r417133. :) Stepan, I'm writing serialization tests for NIO module currently, and still using SerializationTester. I'll update these serialization tests once the new test framework is ready! Thanks! Thanks, > Stepan. > > Thanks! > > On 6/23/06, Stepan Mishura wrote: > > > > > > Hi, > > > > > > I've updated framework for testing serialization page[1] - I added > > > guidelines > > > for developing serialization tests. Also I've removed confusing > > 'TestCase' > > > parameter in SerializationTest.verifySelf() methods. > > > > > > If there are no objections I'm going in next two days to move > > > SerializationTest.java from 'security' module to support folder. So > new > > > location will be: > > > support/src/test/java/org/apache/harmony/testframework/serialization > > > folder. > > > Class name won't change. > > > > > > Thoughts? > > > > > > Thanks, > > > Stepan. > > > > > > [1] > > > > > > > > > http://incubator.apache.org/harmony/subcomponents/classlibrary/ser_testin= g.html > > > > > > On 6/20/06, Stepan Mishura wrote: > > > > > > > > Hi, > > > > > > > > I'm going to start merging existing frameworks for testing > > > serialization. > > > > > > > > As first step I've updated 'security' framework. The updated > framework > > > > searches and loads resource files according [1] and eliminates > > > requirement > > > > to extend SerializationTest. Also to provide smooth frameworks > merging > > > I've > > > > put stub to let the framework search resources in the 'old' way ( > i.e. > > > via > > > > "RESOURCE_DIR" system property). The stub will be removed after > > > completing > > > > the merge. > > > > > > > > The updated framework suggests the following way for testing > > > > serialization: > > > > > > > > a) Compatibility =96 4 new static methods are introduced. > > > > verifyGolden(TestCase, Object) > > > > verifyGolden(TestCase, Object, SerializableAssert) > > > > verifyGolden(TestCase, Object[]) > > > > verifyGolden(TestCase, Object[], SerializableAssert) > > > > > > > > A test should invoke one of above methods, for example, > > > > public void testCompatibility() throws Exception { > > > > SerializationTest.verifyGolden(this, new SomeSerializableClass > > ()); > > > > } > > > > > > > > b) Self-testing: the same as for compatibility =96 there are 4 new > > static > > > > methods that should be invoked from a test: > > > > verifySelf(TestCase, Object) > > > > verifySelf(Object, SerializableAssert) > > > > verifySelf(TestCase, Object[]) > > > > verifySelf(Object[], SerializableAssert) > > > > > > > > For example, > > > > public void testSelf() throws Exception { > > > > SerializationTest.verifySelf(new SomeSerializableClass(), new > > > > MyComparator()); > > > > } > > > > > > > > To complete frameworks merging I'd like to suggest the next steps: > > > > 2) Reviewing the update and the suggested way for testing > > serialization > > > by > > > > the community. Please let me know if it is acceptable and what can > be > > > > improved. > > > > 3) Replace SerializationTester class with SerializationTest. I'm > going > > > to > > > > add more stubs to let existing tests work in the 'old' way. > > > > 4) Adjusting existing serialization tests (moving and renaming > > resource > > > > files, replacing stubs invocation with new methods) > > > > 5) Removing stubs. > > > > > > > > Thanks, > > > > Stepan Mishura > > > > Intel Middleware Products Division > > > > > > > > [1] > > > > > > > > > > http://incubator.apache.org/harmony/subcomponents/classlibrary/ser_testin= g.html > > > > > > > > > > > > ------------------------------------------------------ > > > > Terms of use : http://incubator.apache.org/harmony/mailing.html > > > > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.or= g > > > > For additional commands, e-mail: > harmony-dev-help@incubator.apache.org > > > > > > > > > > > > > > > > -- > > > Thanks, > > > Stepan Mishura > > > Intel Middleware Products Division > > > > > > ------------------------------------------------------ > > > 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.or= g > > > > > > > > > > > > -- > > Andrew Zhang > > China Software Development Lab, IBM > > > > > > > -- > Thanks, > Stepan Mishura > Intel Middleware Products Division > > ------------------------------------------------------ > 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 > > --=20 Andrew Zhang China Software Development Lab, IBM ------=_Part_46805_32411226.1151306410493--